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

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

2013 Aug 15
0
[LLVMdev] BranchInst comparison
How could BranchInst be used to insert new branch between two basic blocks to get result like this example: br label %if.else br label %if.then br i1 %cmp1, label %if.then, label %if.else Thanks for your help On 14 August 2013 21:36, Eli Friedman <eli.friedman at gmail.com> wrote: > Your question isn't clear; please restate what specifically isn't working. > > -Eli
2013 Aug 14
3
[LLVMdev] BranchInst comparison
Your question isn't clear; please restate what specifically isn't working. -Eli On Wed, Aug 14, 2013 at 11:57 AM, Rasha Omar <rasha.sala7 at gmail.com> wrote: > or like this > > %cmp4 = icmp eq i32 %rem, 0 > > br i1 %cmp4, label %if.then5, label %if.else7 > > > On 14 August 2013 20:08, Rasha Omar <rasha.sala7 at gmail.com> wrote: > >> Hi
2013 Sep 08
0
[LLVMdev] "Instruction does not dominate all uses"
Hi Rasha, > Instruction does not dominate all uses! There should be two instructions printed after that message. The first defines a value used by the second, but the message means there's some path through your function that can reach the second inst (the use) without the value being defined by the first instruction. At its simplest you probably want to decide what that value should be
2013 Aug 14
0
[LLVMdev] BranchInst comparison
or like this %cmp4 = icmp eq i32 %rem, 0 br i1 %cmp4, label %if.then5, label %if.else7 On 14 August 2013 20:08, Rasha Omar <rasha.sala7 at gmail.com> wrote: > Hi All, > > How could I use BranchInst to implement for example > br label %if.else7 > br label %if.then5 > br i1 %cmp4, label %if.then5, label %if.else7 > > I can use BranchInst for only one
2013 Jul 31
1
[LLVMdev] Instruction insertion By Module Pass
Thank you for your help I tried Instruction* p=&( Bb->front()); Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext()); AllocaInst* newInst = new AllocaInst(Int32Type,"flag", p); that works well but I need to store the value of the variable too. What's the method that could be used to store specific value?? On 30 July 2013 16:01, John Criswell
2013 Aug 14
2
[LLVMdev] BranchInst comparison
Hi All, How could I use BranchInst to implement for example br label %if.else7 br label %if.then5 br i1 %cmp4, label %if.then5, label %if.else7 I can use BranchInst for only one instruction but how could I compare between two branches Thanks -- * Rasha Salah Omar Msc Student at E-JUST Demonestrator at Faculty of Computers and Informatics Benha University* *
2013 Jul 30
0
[LLVMdev] Instruction insertion By Module Pass
On 7/30/13 7:44 AM, Rasha Omar wrote: > Hi, > I need to insert new instruction into every basic block like x=1 > or while loop > I tried this code, but it doesn't work > > Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext()); > AllocaInst* newInst = new AllocaInst(Int32Type,"flag", Bb); > Bb->getInstList().push_back(newInst); The problem is
2013 Jul 30
2
[LLVMdev] Instruction insertion By Module Pass
Hi, I need to insert new instruction into every basic block like x=1 or while loop I tried this code, but it doesn't work Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext()); AllocaInst* newInst = new AllocaInst(Int32Type,"flag", Bb); Bb->getInstList().push_back(newInst); the error: void llvm::SymbolTableListTraits<llvm::Instruction,
2013 Sep 08
1
[LLVMdev] "Instruction does not dominate all uses"
Hi Tim, Instruction does not dominate all uses! %5 = icmp ne i32 %4, 0 br i1 %5, label %BB1, label %BB2 Broken module found, compilation aborted! On 8 September 2013 11:58, Tim Northover <t.p.northover at gmail.com> wrote: > Hi Rasha, > > > Instruction does not dominate all uses! > > There should be two instructions printed after that message. The first > defines
2013 Aug 20
1
[LLVMdev] Question about removeFromParent
I have Function Function* F; and one of its basic blocks BB I want to insert this BB into a new function without remove it from the original according that BList is the list of the basic blocks of the newFunction BList.insert(BB); but I don't want to call BB->removeFromParent(); and without this method it give me error that BB is already in a container is there another function that get
2013 Sep 10
1
[LLVMdev] Global Variable Recall
Hi All, I need to call global variable by its name from the following code for(Function::iterator i=F->begin();i!=F->end();++i) { BasicBlock*Bb =&*i; GlobalVariable* GV = new GlobalVariable(type,false, F->getLinkage(),0, "F$"+Bb->getName()); GV->setInitializer(Constant::getNullValue (typ)); GList.push_back(GV); } Could I solve that by
2013 Jul 31
1
[LLVMdev] Problem to remove successors
Hi All, I need to remove successors from every basic block to insert new ones I tried this code, but it doesn't work void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) { assert(SuccNum < TI->getNumSuccessors() && "Trying to remove a nonexistant successor!"); // If our old successor block contains any PHI nodes, remove the entry in the //
2013 Aug 12
2
[LLVMdev] TerminatorInst and changing successor
Hi, Is changing the successors for each basic blocks means by default that the Terminator Instruction will be changed or this is another problem should be solved? If case 2 please tell me how to change it according to the new successors? Thanks -- * Rasha Salah Omar Msc Student at E-JUST Demonestrator at Faculty of Computers and Informatics Benha University* * e-mail:
2013 Aug 22
2
[LLVMdev] Crash in CreateShl() method
Hi All, AllocaInst * AI = builder.CreateAlloca(type, 0, BBName); StoreInst* ST= builderTF.CreateStore(ConstantInt::get(type,1),AI); Value * Vresult = (Value*)ST; Vresult = builderWait.CreateShl(Vresult, 1); I need to make one bit shift left to the variable stored in the second step I've got crash in this step opt: /home/xx/llvm2/llvm/include/llvm/Support/Casting.h:237: typename
2013 Jun 07
1
[LLVMdev] CFG of a function
But I don't want to map only basic blocks, I need too to map the edges "the whole CFG of the function" Save the CFG of the function in another memory address and call it for example orgCFG and change the CFG by referencing to the orgCFG Thank you for help and patience On 6 June 2013 10:59, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > I
2013 Jun 06
0
[LLVMdev] CFG of a function
I don't use a function for do the mapping, it may be MapValue(). If it does not work, alias an int identifier for each basic block. Be aware because basic block cannot have the same name (getName) in the same function, but they might have the same name being in different functions. Therefore, take into account the function name as well. Good luck On Thu, Jun 6, 2013 at 10:55 AM, Rasha Omar
2013 Jun 05
2
[LLVMdev] CFG of a function
What do you mean by mapping to integers? On 5 June 2013 22:32, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Why you don't map the basic blocks to integers and apply algorithms on the > integer graph? And construct your new CFG. > > > On Wed, Jun 5, 2013 at 10:27 PM, Rasha Omar <rasha.sala7 at gmail.com> wrote: > >> How
2013 Jun 06
3
[LLVMdev] CFG of a function
I think I understood that, but what I mean is what is the function responsible to do mapping is it MapValue() in ValueMapper.h? Thanks for your help On 6 June 2013 09:54, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Map every basic block from the CFG to a set of integers. The successors > from the CFG can be used to make the edges in your simplified
2013 Jun 06
0
[LLVMdev] CFG of a function
Map every basic block from the CFG to a set of integers. The successors from the CFG can be used to make the edges in your simplified graph. The pair (Callee,Caller) can link the CFG-s between them in a larger CFG-like. On Wed, Jun 5, 2013 at 11:03 PM, Rasha Omar <rasha.sala7 at gmail.com> wrote: > What do you mean by mapping to integers? > > > On 5 June 2013 22:32, Alexandru
2013 Aug 16
2
[LLVMdev] CreateOr no matching member error
For the following code: Type * type = IntegerType::getInt32Ty(getGlobalContext()); IRBuilder<> builder(BB); std::set<Value *> Vset; Value * Vresult=0; for(std::set<Value*>::iterator Vit=Vset.begin();Vit!=Vset.end();Vit++) { Vresult=builder.CreateOr(Vit, Vresult, "WaitOr"); } Vset is inserted in previous loop by 0 or 1 The error