similar to: [LLVMdev] Instruction does not dominate all uses ???

Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] Instruction does not dominate all uses ???"

2010 Jun 23
0
[LLVMdev] Instruction does not dominate all uses ???
Chayan Sarkar wrote: > Hi, > > I am trying to write a small pass. In my pass, I have inserted some > instruction and used that in another. But, during OPT it is showing > "Instruction does not dominate all uses" like following - > > %b.1 = bitcast i32 4 to i32 ; <i32> [#uses=8] %11 > = add i32 %a.1, %b.1 ;
2010 Jun 05
0
[LLVMdev] Converting into SSA form
There is no existing pass to do this in LLVM, mostly because it wouldn't be useful for optimizing programs. From your input, mem2reg produces: define i32 @myfunc(i32 %x, i32 %y) nounwind { entry: %cmp = icmp sgt i32 %x, %y ; <i1> [#uses=1] br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %add = add
2010 Jun 05
2
[LLVMdev] Converting into SSA form
Suppose my Input function is like : myfunc(int x,int y){ int a=2, b=3,c=5; if(x>y) { c=a+b; a=6; } else { c=a*b; b=4; } a=c+a; c=a+b; } and the output should be : myfunc(int x,int y){ int a.0=2, b.0=3,c.0=5; if(x>y) { c.1=a.0+b.0; a.1=6; } else { c.2=a.0*b.0; b.1=4; }
2013 Apr 16
1
[LLVMdev] Instruction does not dominate all uses
Hi, I am writing an alias profiler using the points-to relation. For this I'm inserting a function call of external function with the following type profile(int,int,int,void*,void*,...) I'm trying to pass the dereferenced pointer's memory address and the address of the location who are in alias set of the pointer. For this i'm using BitCastInst BitCastInst *init1= new
2010 Jul 18
2
[LLVMdev] How to traverse Dominator Tree in pre-order manner
Hi, Can anyone tell me how to traverse Dominator tree in pre-order manner? Regards, Chayan
2018 Aug 30
2
Instruction does not dominate all uses!
Hello All, I am instrumenting IR to pass addres of the function to runtime but I am getting error - Instruction does not dominate all uses. I used M.dump() to get below dump, not able to figure out what I am doing wrong. Any help would be much appreciated. define dso_local double @mysqrt(double %val1) local_unnamed_addr #0 { entry: %0 = bitcast double (double)* @mysqrt to i8* %1 = call
2010 Jul 17
1
[LLVMdev] replace instruction
Hello all, Suppose I have an Instruction like %1 = add i32 %a, %b and I want to convert it like %t = add i32 %a, %b and assign the value of %t to %1 (something like %1 <- %t ) how can I accomplish this? Regards, Chayan
2010 Jun 07
2
[LLVMdev] Converting into SSA form
Hi Jeffrey, Actually I am trying to implement "E-path PRE" which is based on non-algebric equivallence. So, the variable names need to be preserved. You said that I need to insert these to preserve variable %a.0 = bitcast i32 2 to i32 So, these need to be inserted before the mem2reg pass or within the pass. In first case, how to call an inbuilt pass after doing some analysis from my
2017 Jun 10
2
Instruction does not dominate all uses!
LLVM 3.8.0, Ubuntu 16.04.2, 64 bit is being used to instrument IR. ==================================================== define i32 @bar() #0 { entry: %var = alloca [3 x i32], align 4 %0 = bitcast [3 x i32]* %var to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast ([3 x i32]* @bar.var to i8*), i64 12, i32 4, i1 false) %arrayidx = getelementptr inbounds [3 x i32], [3 x i32]*
2012 Aug 20
0
[LLVMdev] Problem with "Does not dominate all uses"
In your original file, %6 is defined in if.end11 and is used in cond.end. if.end11 branches to cond.true and cond.false, both of which branch unconditionally to cond.end. Therefore %6 dominates its use. In your second file %18 is defined in end.11 and used in cond.end. However, end.11 no longer dominates cond.end because you have rewritten all branches to go through the switch statement in
2012 Aug 20
3
[LLVMdev] Problem with "Does not dominate all uses"
Hi! I'm having some trouble with a pass I'm writing. I'm using DemotePHIToStack to remove all phi node in my code with this code (this is the first thing I do in my pass): // Erase phi node vector<PHINode*> phis; for (Function::iterator i=f->begin();i!=f->end();++i) { for(BasicBlock::iterator b=i->begin();b!=i->end();++b) {
2010 Jul 21
0
[LLVMdev] How to insert a basic block in an edge
Hi, I could not figure out, how to declare a Pass*. Can anyone give me an example, how to use SplitEdge() function ? Please help me out. Regards, Chayan On Tue, Jul 20, 2010 at 10:12 AM, Chayan Sarkar <chayan.ju at gmail.com> wrote: > Hi All, > > Still I could not figure out how to use Pass* while calling > SplitEdge() function. Can anyone provide me some example? > >
2010 Jul 20
2
[LLVMdev] How to insert a basic block in an edge
Hi All, Still I could not figure out how to use Pass* while calling SplitEdge() function. Can anyone provide me some example? Regards, Chayan On Sun, Jul 18, 2010 at 11:49 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > Chayan Sarkar wrote: >> >> Hi, >> >> I have tried to use SplitEdge function, but failed. Actually the third >> parameter is a variable of
2010 Jun 05
3
[LLVMdev] Converting into SSA form
But, the mem2reg pass removes all load store instructions. It replaces all variables by their if possible (kind of constant propagation). I have generated the bitcode of the source program and the applied the mem2reg pass and obviously not getting desired thing. What I want is convert it into SSA form without replacing any variable by their constant value. Please elaborate on your point. Also,
2010 Jun 18
1
[LLVMdev] Erasing Instruction
Hi, Can anyone tell me how to erase an instruction, (specially a load/store instruction) ? If I use Instr->eraseFromParent(), I get following error. Note the instruction does not have any use. opt: /home/chayan/llvm/llvm-2.6/include/llvm/ADT/ilist.h:218: llvm::ilist_iterator<NodeTy>& llvm::ilist_iterator<NodeTy>::operator++() [with NodeTy = llvm::Instruction]: Assertion
2010 Jul 19
0
[LLVMdev] How to traverse Dominator Tree in pre-order manner
Chayan Sarkar wrote: > Hi, > > Can anyone tell me how to traverse Dominator tree in pre-order manner? > In previous versions of LLVM, I believe you could get some sort of Node object from DominatorTree and then use a method to get the children of the Node (and then use a method of the Node to get the BasicBlock held in that Node). However, I don't see such a method in the
2010 Jul 18
2
[LLVMdev] How to insert a basic block in an edge
Hi, I have tried to use SplitEdge function, but failed. Actually the third parameter is a variable of type Pass and it need to be non-null. But I could not figure out how to use it. Please help me out. Regards, Chayan On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > Chayan Sarkar wrote: >> >> Hi all, >> >> Suppose in a CFG bb1 has two
2010 Jun 07
0
[LLVMdev] Converting into SSA form
E-path PRE requires the program in SSA form like SSAPRE algorithm. Then it finds the eliminatable path (e-path) for an expression and converts partially redundant to fully redundant and removes redundancy Chayan On Mon, Jun 7, 2010 at 1:58 PM, Eli Friedman <eli.friedman at gmail.com> wrote: > On Sun, Jun 6, 2010 at 8:56 PM, Chayan Sarkar <chayan.ju at gmail.com> wrote: >> Hi
2010 Jul 18
0
[LLVMdev] How to insert a basic block in an edge
Chayan Sarkar wrote: > Hi, > > I have tried to use SplitEdge function, but failed. Actually the third > parameter is a variable of type Pass and it need to be non-null. But I > could not figure out how to use it. Please help me out. The only reason it needs a non-NULL Pass* is to call llvm::SplitBlock which uses P->getAnalysisIfAvailable unconditionally. Feel free to wrap
2011 May 02
0
[LLVMdev] difficulty in replicating a sequence of instructions + inserting at a different location -- "instruction doesn't dominate all uses"
On 5/2/11 11:59 AM, Chuck Zhao wrote: > I am having difficulty in replicating a sequence of instructions (2+, > with def-use dependencies within) and inserting them at a different > location. > > I have tried a few different approaches (IRBuilder, new Instruction(), > I->clone(), insertBefore/insertAfter,etc.), all leading to the same > error msg: > "Instruction