similar to: Print emory for constant address

Displaying 20 results from an estimated 8000 matches similar to: "Print emory for constant address"

2018 Dec 12
2
How to get the destination in a LoadInst
Thanks Joshua and Michael, Just to to clarify, I'm experimenting with the Interpreter class and observing the instructions that are executed by it. Just for becoming more confident with LLVM in general I'd like for each instruction to access to the various parts of it. In this instance I would like to access to the %Name that is shown in the textual representation. When I call
2018 Mar 09
4
Dump LLVM StoreInst
Hi, I’m writing a loop-free LLVM pass, my thought is to track if the value inside the loop is changed, so I look up the Instruction StoreInst first and try to get its value in a set. I checked getValueOperand(), getValueName() in the API document but unfortunately they failed the compilation. if (isa<StoreInst>(I)){ Value* v = I.getOperand(0); Instruction* op1 =
2019 Oct 23
3
Inserting instructions when encountered a specific label
Hi Tim, Thank you for the quick response! so you'd probably check you're looking at a BranchInst and check BI->getSuccessor(0)->getName() (& 1 if it's conditional) I initially was printing out the result from getName() (I.getParent()->getName()) and it printed out nothing sadly. when parsing the instructions in SelectionDAGBuilder but it was only visiting instructions in
2019 Oct 23
2
Inserting instructions when encountered a specific label
Hello, I’m trying to insert an instruction if a specific label name/string is encountered and would appreciate some guidance on where I should start. Basically when parsing going through this .ll file: ; Function Attrs: noinline nounwind optnone uwtable define i32 @main(i32, i8**) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 %5 = alloca i8**, align 8 %6 = alloca i32, align
2018 Mar 10
0
Dump LLVM StoreInst
The code you've pasted there is inconsistent in variable names. Your created an instruction called 'op1' but your print uses 'v1'. What should be an '->' is just a '-'. You also have a variable in your print called 'op' but that's not declared in your code. Also the result of dyn_cast should always be checked for null before using the result.
2013 Jan 28
5
[LLVMdev] Value* to Instruction*/LoadInst* casting
Hello everyone, Can you please tell me if it is possible in LLVM to cast a `Value*` to an `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true? In my particular piece of code: Value* V1 = icmpInstrArray[i]->getOperand(0); Value* V2 = icmpInstrArray[i]->getOperand(1); if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){ ...
2012 Jul 09
1
[LLVMdev] Problem with getting a result of an instruction.
Hello, I'm a newbie in LLVM. Now I'm trying to implement a pass that does some simple form of dynamic dataflow analysis. In my dataflow analysis I want to know if a specific variable is "dependent" on another one. "Dependent" means the following: if we have three variables in a program - a, b and c and in some places of this program we have the following
2013 Jan 28
1
[LLVMdev] Value* to Instruction*/LoadInst* casting
Hi Alexandru, > The compilation error is : `error: ‘LD100’ was not declared in this scope.` > > On Mon, Jan 28, 2013 at 11:31 AM, Alexandru Ionut Diaconescu < > alexandruionutdiaconescu at gmail.com> wrote: > >> Hello everyone, >> >> Can you please tell me if it is possible in LLVM to cast a `Value*` to an >> `Instruction*/LoadInst*` if for example
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
The compilation error is : `error: ‘LD100’ was not declared in this scope.` On Mon, Jan 28, 2013 at 11:31 AM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello everyone, > > Can you please tell me if it is possible in LLVM to cast a `Value*` to an > `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true? > In my
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
Alexandru Ionut Diaconescu wrote: > Hello everyone, > > Can you please tell me if it is possible in LLVM to cast a `Value*` to > an `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is > true? http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates In my particular piece of code: > > Value* V1 =
2019 Apr 23
5
StringRef Iterator Variable Display
Hello, I want to display the variable names in stringref iterator. But it is not displayed using following code. for (set<StringRef>::iterator sit = L.begin(); sit != L.end(); sit++) { errs() << *sit << " "; } How to do this? Please help.. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Jul 14
0
[LLVMdev] Analysis of polly-detect overhead in oggenc
Tobi, it looks like this code is the problem: for (std::vector<Value *>::iterator PI = Pointers.begin(), PE = Pointers.end(); ;) { Value *V = *PI; if (V->getName().size() == 0) OS << "\"" << *V << "\""; else OS << "\"" << V->getName() <<
2009 Aug 04
3
[LLVMdev] Outputting hex in DOUT's
On Tuesday 04 August 2009 18:24, Chris Lattner wrote: > The big issue is things like this: > > DOUT << foo.getName() << "\n"; > > When -debug is disable and even when assertions are turned off, > foo.getName() is still called. When you use: Yep, that's a problem. > DEBUG(errs() << foo.getName() << "\n"); > > When
2012 Apr 09
3
[LLVMdev] How to instrument a this function using insertBefore instruction???
Hi all, Im trying to instrument this hello function right before the instruction that call the "puts" function(the source code is as follow). Now I can compile the pass without errors, but when run the pass with opt tool, it broke down. The diagnose is something like Referencing function in another module! %CallCheck = call i32 @fib() Broken module found, compilation aborted! Does
2009 Aug 04
0
[LLVMdev] Outputting hex in DOUT's
On Aug 4, 2009, at 4:03 PM, David Greene wrote: > On Tuesday 04 August 2009 17:52, Chris Lattner wrote: > >> I'd prefer for it to be eliminated, but it is currently used widely. >> If your patches don't make it substantially worse, I won't have a >> problem with them. Bonus points for removing DOUTs though :) > > Ok, this is good to know. With some of
2011 Dec 02
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On 11/23/2011 05:52 PM, Hal Finkel wrote: > On Mon, 2011-11-21 at 21:22 -0600, Hal Finkel wrote: >> > On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: >>> > > Tobias, >>> > > >>> > > I've attached an updated patch. It contains a few bug fixes and many >>> > > (refactoring and coding-convention) changes inspired
2012 Apr 09
0
[LLVMdev] How to instrument a this function using insertBefore instruction???
Hi, I got upset.. What does “Broken module found, compilation aborted!” mean really?? what‘s “broken module“?? -- 祝好! 甄凯 ------------------------------------------------------------------------------------------------------ 2012-04-09 ------------------------------------------------------------------------------------------------------ Name: 甄凯(ZhenKai)
2012 Apr 09
2
[LLVMdev] How to instrument a this function using insertBefore instruction???
Hi, I don't think the code you pasted can be the correct code, where does FibF come from? Anyway, the problem is that you're calling the FibF from Module A, however you defined it for Module B. You need to insert the FibF function into the Module that you're running. To do this override "virtual bool doInitialization(Module &M);" and insert FibF into M. Joey 2012/4/9
2012 Apr 10
4
[LLVMdev] How to explain this weird phenomenon????????
My friends, I ran a function pass on a .bc file, intending to insert a CallInst to my self-made check function. The compilation is successful. BUT after I ran that pass on the .bc file, the size of the file didn't get any bigger!! Does this mean my instrumentation work failed?? BTW the opt command I use is "opt -load ../../../Debug+Asserts/lib/Hello.so -hello <hello.bc> -o
2012 Sep 21
0
[LLVMdev] How To Get The Name of the type the popinter is pointing to
i am using llvm , i did this if ( AllocaInst *allocInst = dyn_cast<AllocaInst>(&*bbit)){ PointerType *p = allocInst->getType(); if ( p->getElementType()->isPointerTy()){ StringRef name = allocInst->getName();