similar to: [LLVMdev] Question about removeFromParent

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Question about removeFromParent"

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 May 29
0
[LLVMdev] CloneFunctionInto() Error
Does cloning copies the function with its address or it constructs a new address to the new function? Is this real copying for the CFG or just opaque one to do some work? If it's not real copying, please I need a method that can help me in copying the function in another with new pointer to another address. Please I need answer urgent Thanks On 29 May 2013 10:14, Rasha Omar <rasha.sala7
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 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 Sep 08
2
[LLVMdev] "Instruction does not dominate all uses"
BB: %4= load i32* @"FB" %5 = icmp ne i32 %4, 0 br i1 %5, label %BB1, label %BB2 The error after $clang -pthread MyNew.ll -o MyNew Instruction does not dominate all uses! Could you help for this ? -- * Rasha Salah Omar Msc Student at E-JUST Demonestrator at Faculty of Computers and Informatics Benha University* * e-mail: rasha.omar at ejust.edu.eg*
2013 May 29
2
[LLVMdev] CloneFunctionInto() Error
Dear All, I need your help urgently I have to copy the CFG of each function using CloneFunction or CloneFunctionInto. After I made the copy function. Print the basic blocks then get this error : While deleting: i32 % Use still stuck around after Def is destroyed: %mul2_ = mul nsw i32 %6, 3 Use still stuck around after Def is destroyed: store i32 3, i32* %x_, align 4 opt: Value.cpp:75: virtual
2013 Jul 24
0
[LLVMdev] Steps to addDestination
Hi Rasha, On Wed, Jul 24, 2013 at 12:28 AM, Rasha Omar <rasha.sala7 at gmail.com> wrote: > 1- I need the first example. Oh good. > 2- I set the Address uninitialized according to the documentation > " Setting the name on the Value automatically updates the module's symbol > table" from Value.h source code That's referring to a string name, and is only really
2013 Jul 23
2
[LLVMdev] Steps to addDestination
1- I need the first example. 2- I set the Address uninitialized according to the documentation " Setting the name on the Value automatically updates the module's symbol table" from Value.h source code 3- I'm not sure about "select" instruction, you mean that the address is the new destination (basic block)that will be added Thanks On 23 July 2013 16:38, Tim Northover
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 Aug 12
0
[LLVMdev] TerminatorInst and changing successor
Hi Rasha, > 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? I think the only way you *can* change a basic block's successors is by changing its terminator instruction, so "by default" is the closest answer. Though you should make sure your basic block only has
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 22
2
[LLVMdev] SwitchInst problem
Hi All, Value* V; Value* V2; BasicBlock * BB; unsigned j; ///number of cases .... //insert V , V2, j and BB SwitchInst* sw= builder.CreateSwitch(V, BB, j); ConstantInt * CI= dyn_cast<ConstantInt>(V2); sw-> addCase( CI , BB); At last step there is Program received signal SIGSEGV, Segmentation fault. What is wrong in the code? Thanks in advance -- * Rasha Salah Omar
2013 Jun 10
0
[LLVMdev] CFG of a function
Hi Rasha, First, you should not erase that cloned function XD the idea is that your pass should create that new function, add it to a module (that could be the same one where the original function is, or another one that you could be creating if that is the case), and then just let it be: the pass manager should identify this new function (after your pass returned) and all the other analysis and
2013 Jul 23
2
[LLVMdev] Steps to addDestination
Hi, I need to addDestination to some basic blocks I used the following code Value* Address; IndirectBrInst *IBI = IndirectBrInst::Create(Address, Result.size(),i->getTerminator() ); IBI->addDestination(i); The following error was issued void llvm::IndirectBrInst::init(llvm::Value *, unsigned int): Assertion `Address && Address->getType()->isPointerTy() &&
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 Jul 23
0
[LLVMdev] Steps to addDestination
Hi Rasha, > I need to addDestination to some basic blocks Just to make sure there's no confusion here: you really are trying to create code like: define i32 @foo(i1 %tst) { %Address = select i1 %tst, i8* blockaddress(@foo, %true), i8* blockaddress(@foo, %false) indirectbr i8* %Address, [label %true, label %false] ; This is what you're creating true: ret i32 42 false: ret i32
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 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