similar to: [LLVMdev] Finding the uses of a global variable

Displaying 20 results from an estimated 700 matches similar to: "[LLVMdev] Finding the uses of a global variable"

2013 Apr 07
1
[LLVMdev] How to get the Instruction where one function use the global variable.
Hi, all I try to get the Instructions where one function use the global variable. for (llvm::Module::global_iterator gvar_iter = M.global_begin(); gvar_iter != M.global_end(); gvar_iter++) { llvm::GlobalVariable *gvar = &*gvar_iter; llvm::errs() << "const global var: " << gvar->getName() << "\n"; for (
2012 Aug 18
1
[LLVMdev] GlobalVariable initializer using from beyond the grave
For LLDB I'm writing a dumb module pass that removes all global variables, by running the following code: bool erased = true; while (erased) { erased = false; for (Module::global_iterator gi = llvm_module.global_begin(), ge = llvm_module.global_end(); gi != ge; ++gi) { GlobalVariable *global_var =
2012 Dec 05
0
[LLVMdev] how to get and modify a global variable inside a module
Hi Dong Chen, I realized you are actually executing the IR, right? I am not sure if the things I mentioned apply in that case. Actually, I wrote a optimization pass that modify the IR. It modifies global variables and the final IR is intended to be compiled. A snippet of what I do looks like this: class TestClass : public llvm::ModulePass { public: TestClass() : llvm::ModulePass(TestClass::ID)
2013 Feb 28
0
[LLVMdev] how can I parse a Value* ?
Hello everyone, I have the following LLVM IR : @.str = private unnamed_addr constant [3 x i8] c"DS\00", section "llvm.metadata" @llvm.global.annotations = appending global [1 x { i8*, i8*, i8*, i32 }] [{ i8*, i8*, i8*, i32 } { i8* bitcast (i32* @f to i8*), i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str1, i32 0, i32 0),
2012 Dec 05
2
[LLVMdev] how to get and modify a global variable inside a module
hi Eduardo, thanks for your attention, i checked the iterator, but i didn't see any fucntion can return or modify the main memory address of a global variable inside the module. can you provide some reference code or program can achieve this? thank you very much -- View this message in context:
2011 Sep 04
1
output and save multiple dataset from a function: sorry I could not figure out this....
Dear list: Before going into my problem, R list has been awesome for me ...thank you for the help. I have a simple problem, however I could get a answer to it... #my data myseed <- c(1001:1030) gend <- function(x){ set.seed(x) var <- rep(1:4, c(rep(4, 4))) vary <- rnorm(length(var), 50, 10) mat <- matrix(sample(c(-1,0,1), c(10*length(var)), replace = TRUE), ncol = 10) mydat <-
2015 Jun 08
4
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Mon, Jun 8, 2015 at 11:33 AM, Reid Kleckner <rnk at google.com> wrote: > The clang patch lgtm, and I had some comments on the LLVM patch. Duncan, do > you want to say more there? > > --- include/llvm/Transforms/IPO/PassManagerBuilder.h (revision 237590) > +++ include/llvm/Transforms/IPO/PassManagerBuilder.h (working copy) > @@ -121,6 +121,7 @@ class PassManagerBuilder {
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
Talked to Eric Fri and he suggested that this might be the first of several places where we want behavior of LTO compiles to diverge from normal -O2 compiles. So for now I have implemented this such that we pass down -flto to the -cc1 job, and that gets propagated as a code gen option and into the PassManagerBuilder. I have left the current logic translating -flto to the -emit-llvm-bc option,
2012 Jan 26
2
extracting from data.frames for survival analysis
Hi, I have a data frame: > class(B27.vec) [1] "data.frame" > head(B27.vec) AGE Gend B27 AgeOn DD uveitis psoriasis IBD CD UC InI BASDAI BASFI Smok UV 1 57 1 1 19 38 2 1 1 1 1 1 5.40 8.08 NA 1 2 35 1 1 33 2 2 1 1 1 1 1 1.69 2.28 NA 1 3 49 2 1 40 9 1 1 1 1 1 1 8.30 9.40 NA
2004 Jun 19
2
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
On Fri, 2004-06-18 at 10:13, Chris Lattner wrote: > Module::gbegin/gend iterate over the global variables, and ::begin/end > iterate over the functions, some of which may be prototypes. This confused Vladimir and I remember it confusing me when I was reviewing LLVM core a few months ago. Would it be worthwhile to consider naming these globals_begin/globals_end and
2004 Jun 19
1
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
Chris Lattner wrote: > > And why isn't it possible to just make those functions known to LLVM? > > After all, *I think*, if this function is to be called, it should be > > declared in assembler, and so you have to pass some information abou > > those function to the code printer. (Of course, it's possible to just > > directly print the declarations, but
2004 Jun 18
0
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
On Fri, 18 Jun 2004, Vladimir Prus wrote: > > actually exist in the LLVM module for the function. In particular, this > > would include any functions in a code-generator specific runtime library > > and malloc/free. The X86 code generator compiles floating point modulus > > into fmod calls, and 64-bit integer div/rem into runtime library calls. > > And why isn't
2004 Jun 18
3
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
Chris Lattner wrote: > > Second, MO_ExternalSymbol is used for storing name of external > > variable/function, right? Why it's not possible to use MO_GlobalAddress, > > where returned GlobalValue* has isExternal set to true? The > > GlobalValue::getName would return the name of the symbol. > > Using the GlobalValue is certainly the preferred way if you have it.
2004 Oct 19
1
[LLVMdev] Re:question about Insert callInst to call a function in library
Thanks Chris, but the method you mentioned is not what I want. Maybe I didn't make it clear. As you said, /runtime/libprofile is runtime library for the following function. llvm_start_func_profiling llvm_start_block_profiling llvm_start_basic_block_tracing llvm_trace_basic_block And those above functions can be inserted into basic block etc for getting profile. However, those
2008 Jan 26
1
Any numeric differentiation routine in R for boundary points?
Hi, I have a scalar valued function with several variables. One of the variables is restricted to be non-negative. For example, f(x,y)=sqrt(x)*exp(y), then x should be non-negative. I need the gradient and hessian for some vector (0,y), i.e., I need the gradient and hessian at the boudary of parameter space. The "numderiv" package does not work, even for f(x)=sqrt(x), if you do
2004 Apr 02
1
[LLVMdev] Verifier & abort()
P.S. Here's an example of verifier code that can emit multiple messages: bool doFinalization(Module &M) { // Scan through, checking all of the external function's linkage now... for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) visitGlobalValue(*I);
2004 Jun 19
0
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
On Fri, 18 Jun 2004, Reid Spencer wrote: > On Fri, 2004-06-18 at 10:13, Chris Lattner wrote: > > > Module::gbegin/gend iterate over the global variables, and ::begin/end > > iterate over the functions, some of which may be prototypes. > > This confused Vladimir and I remember it confusing me when I was > reviewing LLVM core a few months ago. Would it be worthwhile to
2004 Jun 19
1
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
sure, that's reasonable. I'll make the patch but later this weekend .. bigger fish to fry :) Reid. On Fri, 2004-06-18 at 22:44, Chris Lattner wrote: > On Fri, 18 Jun 2004, Reid Spencer wrote: > > On Fri, 2004-06-18 at 10:13, Chris Lattner wrote: > > > > > Module::gbegin/gend iterate over the global variables, and ::begin/end > > > iterate over the
2007 May 22
1
Manipulating the sizes of multiple screens
Hi, I used split.screen command to creaye 5 screens, 4 screens contain a plot each, the fifth screen is designated to a legend. I am having difficulties setting the dimensions of the screens in a way that would allow me to have the screen dedicated to the legend smaller. I end up with a very awkward aspect at the end: 4 small plots with a big space for the legend. The gend needs to be at
2017 Aug 29
5
Is the flow "llvm-extract -> llvm-link -> clang++ " supposed to be used in this way? To Extract and Re-insert functions?
Hi all, First post to the list, I hope you can help or guide me on this task. I am involved in a project that requires to re-link extracted and edited IR code Thus I want to know if these tools can be used in this way? clang++-4.0 code03.cpp -emit-llvm -S -o code03.ll llvm-extract-4.0 code03.ll -func main -S -o extracted_main.ll llvm-link-4.0 code03.ll -only-needed -override extracted_main.ll