similar to: [LLVMdev] Problem with getting a result of an instruction.

Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] Problem with getting a result of an instruction."

2009 Sep 06
3
[LLVMdev] Graphviz and LLVM-TV
On 2009-09-06 19:57, Ioannis Nousias wrote: > Edwin, > > thank you for your effort, but I'm not sure I understand. > Are you describing a graph traversal problem? Is the data model stored > in a predecessor/successor fashion, which requires you to 'walk' the > graph in order to visit all nodes? (and what happens when you have > disjointed DFGs?). Sorry for the
2009 Sep 07
0
[LLVMdev] Graphviz and LLVM-TV
Edwin, thanks, it starts making sense inline comments... Török Edwin wrote: > On 2009-09-06 19:57, Ioannis Nousias wrote: > >> Edwin, >> >> thank you for your effort, but I'm not sure I understand. >> Are you describing a graph traversal problem? Is the data model stored >> in a predecessor/successor fashion, which requires you to 'walk' the
2009 Sep 06
2
[LLVMdev] Graphviz and LLVM-TV
On 2009-09-06 17:30, Ioannis Nousias wrote: > I've tried to write a DFGPrinter based on the CFGPrinter, as you > suggested, but encountered problems. > > The GraphWriter expects > GraphTraits<GraphType>::nodes_begin()/nodes_end(). The way this is > implemented in CFG.h, a function is a graph of basic blocks. A > GraphTraits<Function*> inherits from
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
Edwin, thank you for your effort, but I'm not sure I understand. Are you describing a graph traversal problem? Is the data model stored in a predecessor/successor fashion, which requires you to 'walk' the graph in order to visit all nodes? (and what happens when you have disjointed DFGs?). inline comments follow... Török Edwin wrote: > On 2009-09-06 17:30, Ioannis Nousias
2013 Jan 10
2
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
Hello everyone ! In my pass I inspect the penultimate instruction from every basic block in runOnFunction(). I am interested in ICMP instructions only. if(BB->size()>1) if(last->getPrevNode()) { previous = last->getPrevNode(); ok=1; } I want to get the operands of previous, which is of type Instruction*. Due tests based on getNumOperands, ICMP has 2 (as
2009 Sep 06
0
[LLVMdev] Graphviz and LLVM-TV
I've tried to write a DFGPrinter based on the CFGPrinter, as you suggested, but encountered problems. The GraphWriter expects GraphTraits<GraphType>::nodes_begin()/nodes_end(). The way this is implemented in CFG.h, a function is a graph of basic blocks. A GraphTraits<Function*> inherits from GraphTraits<BasicBlock*>, and implements those nodes_begin()/nodes_end()
2017 Jun 12
4
How to know the sub-class of a Value class?
As a concrete question, I understand 'Value' class is the parent of many concrete sub-classes. Let's say I retrieve a Value* value = store_inst->getValueOperand(). Unless I know what the sub-type is, how can I further use this object? I tried something like this: ================================================= Value* value = store_inst->getValueOperand()
2009 Mar 26
0
[LLVMdev] how to get the InvodInst 's Operand Name?
Hi zhangzw, >> invoke void @__cxa_throw(i8* %7, i8* bitcast >> (%struct.__fundamental_type_info_pseudo* @_ZTIi to i8*), void (i8*)* >> null) >> noreturn to label %invcont unwind label %lpad > > >>are you trying to get the name "@_ZTIi" or "@__cxa_throw"? > > yes! i want get the name @_ZTi or @__cxa_throw, > the latter
2009 Aug 13
1
[LLVMdev] Graphviz and LLVM-TV
Hi Ioannis, On Thu, 2009-08-13 at 19:31 +0100, Ioannis Nousias wrote: > Thanks Tobi for the tip. > > however I also need the Data-Flow-Graph of each basic block/functions. > As I said, I need a view of how the instructions 'link' to each other > (via registers or memory aliasing or whatnot) I believe that there is not yet a DOT printer for this kind of information.
2013 Jan 10
0
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
Hi, On 10/01/13 10:56, Alexandru Ionut Diaconescu wrote: > Hello everyone ! > > In my pass I inspect the penultimate instruction from every basic block in > runOnFunction(). I am interested in ICMP instructions only. > > |if(BB->size()>1) > if(last->getPrevNode()) > { > previous = last->getPrevNode(); > ok=1; > } > |
2012 Feb 15
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Just want to test out the LLVM's AliasAnalysis::getModRefInfo API. The input C code is very simple: void foo(int *a, int *b) { for(int i=0; i<10; i++) b[i] = a[i]*a[i]; } int main() { int a[10]; int b[10]; for(int i=0; i<10; i++) a[i] = i; foo(a,b); return 0; } Obviously, for "foo", it only reads from array "a" and only writes to array
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 =
2011 Oct 17
2
[LLVMdev] Variable name from metadata
Hi All,   Can we extract name of variable name from "MDNode" ?   1. Neither temp_MDNode->getName() nor temp_MDNode->getValueName() give me "global_int" which is name of a variable.   2. I tried below ways as well. DIVariable DV(mdnode1); Value *v = mdnode1->getOperand(0);//gives add 0x69   3. I have written below code to reach till variable name.        LLVMIname is
2017 Jun 12
4
How to know the sub-class of a Value class?
On 11 June 2017 at 23:06, Jeremy Lakeman <Jeremy.Lakeman at gmail.com> wrote: > http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast- > templates > I understand isa and dyn-cast let you test the type of an object at run-time by leveraging LLVM's custom implementation of RTTI. However, it doesn't make much sense to test out for all possible sub-classes to
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.
2011 Oct 17
0
[LLVMdev] Variable name from metadata
Closing this, found below links to get variable name.   http://groups.google.com/group/llvm-dev/browse_thread/thread/1a239f0d24db2b5c   http://markmail.org/message/fj5qg44vyjsdde7k#query:+page:1+mid:5zhmyncisenomcga+state:results           I could do following, to get the required information.                 const CallInst *CI = dyn_cast<CallInst>(Insn);                 int numoperands =
2009 Mar 26
2
[LLVMdev] how to get the InvodInst 's Operand Name?
Hi Duncan, >>are you trying to get the name "@_ZTIi" or "@__cxa_throw"? yes! i want get the name @_ZTi or @__cxa_throw, the latter @__cxa_throw i can get it throw value->getName(), but the @_ZTi it did n't has name! zhangzw thanks 2009/3/26 Duncan Sands <baldrick at free.fr>: > Hi zhangzw, > >> invoke void @__cxa_throw(i8* %7, i8*
2008 Nov 23
2
[LLVMdev] RFC: Mangling Unnamed Global Values
Hi all, Right now the Mangler::getValueName() method will produce something like "__unnamed_1_37" for a global value that doesn't have a name. This is wrong for Objective-C where CFStrings will get these labels, thus preventing the linker from coalescing them. [/tmp]> nm -s __DATA __cfstring -m foo.o 00000000000244d0 (__DATA,__cfstring) non-external __unnamed_1_0
2008 Nov 24
0
[LLVMdev] RFC: Mangling Unnamed Global Values
Can symbols with external linkage but no name be converted to have internal linkage? Would that solve the problem? Dan On Nov 23, 2008, at 2:15 AM, Bill Wendling wrote: > Hi all, > > Right now the Mangler::getValueName() method will produce something > like "__unnamed_1_37" for a global value that doesn't have a name. > This is wrong for Objective-C where CFStrings
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Something must be wrong, more probable on my side. So the C source code is unchanged, I just did another experiment to first extract all the GEPs in the code, and call AliasAnalysis::alias on each pair of GEPs. Here is the code: AliasAnalysis &AA = getAnalysis<AliasAnalysis>(); TargetData &TD = getAnalysis<TargetData>(); for (Module::iterator it = M.begin();