search for: clonebasicblock

Displaying 20 results from an estimated 37 matches for "clonebasicblock".

2005 Jan 17
2
[LLVMdev] CloneBasicBlock doesn't change parent of cloned instructions
It seems the CloneBasicBlock function defined in Transforms/Utils/Cloning.h doesn't change the parent BasicBlock of the contained instructions when it has cloned them -- Is this a bug or a feature? m.
2005 Jan 17
0
[LLVMdev] CloneBasicBlock doesn't change parent of cloned instructions
On Mon, 17 Jan 2005, Morten Ofstad wrote: > It seems the CloneBasicBlock function defined in Transforms/Utils/Cloning.h > doesn't change the parent BasicBlock of the contained instructions when it > has cloned them -- Is this a bug or a feature? I'm not sure I understand. This code: Instruction *NewInst = II->clone(); .. NewBB->ge...
2010 Jun 04
4
[LLVMdev] Duplicating a Basic Block
Hi, I had asked earlier from my another ID about duplicating a basic block, but that server is down for moment. I was given suggestion to use CloneBasicBlock, but when I used it I get an error : While deleting: i32* %a Use still stuck around after Def is destroyed: store i32* %a, i32** %p, align 4 opt: /home/ambika/llvm_3/llvm-2.6/lib/VMCore/Value.cpp:81: virtual llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value i...
2010 Jun 04
0
[LLVMdev] Duplicating a Basic Block
On Fri, Jun 4, 2010 at 2:15 AM, Ambika Agarwal <agarwal.ambika at gmail.com> wrote: > Hi, > > I had asked earlier from my another ID about duplicating a basic block, but > that server is down for moment. > I was given suggestion to use CloneBasicBlock, but when I used it I get an > error : > > While deleting: i32* %a > Use still stuck around after Def is destroyed:  store i32* %a, i32** %p, > align 4 > opt: /home/ambika/llvm_3/llvm-2.6/lib/VMCore/Value.cpp:81: virtual > llvm::Value::~Value(): Assertion `use_empty() &&amp...
2012 Jun 21
3
[LLVMdev] Cloning block for newbie
Hello everybody. I'm quite new to LLVM and I'm encontering problems with cloning basic blocks. My two basic blocks are in the same function and it doesn't really matter how the cloned one behave for the moment. Of course, to do so, I used the cloning.h 's method "CloneBasicBlock" but I have the "Instruction does not dominate all uses!" error. I know what it means, I just don't know how to get rid of it without getting more complicated errors. (I tried manipulating the VMap, the metadatas, cloning each instruction one by one,...). Is there a way to know...
2011 Apr 17
4
[LLVMdev] Regarding BasicBlock Cloning
The clone llvm:CloneBasicBlock copies the phi function in the replicated basic block from the original basic block. I don't want the copy of phi in relplicated block. For now I am creating .bc file with -O0 option so that it doesn't generate phi function in first place. Is this a good approach or there are some other fun...
2008 Sep 02
0
[LLVMdev] CloneBasicBlock and Unnamed Temporaries
Hi, I was trying to use CloneBasicBlock() (in Cloning.h) to clone basic blocks in one of my transform passes. For example, when I have a basic block like: bb1: ; preds = %bb load i32* %i, align 4 ; <i32>:11 [#uses=2] load i32* %n_addr, align 4 ; <i32>:12 [#uses=2] icmp slt i32 %11, %12 ; <i1>:13 [#uses=2] clon...
2016 May 05
2
No remapping of clone instruction in CloneBasicBlock
Hi, Found CloneBasicBlock utility only does the cloning without any remapping. Consider below example: Input block: sw.epilog: ; preds = %sw.bb20, %sw.bb15, %sw.bb10, %sw.bb6, %sw.bb2, %sw.bb, %while.body, %if.end29 %no_final.1 = phi i32 [ %no_final.055, %while.body ], [ 1, %if.end...
2012 Jun 21
0
[LLVMdev] Cloning block for newbie
...r your quick answer... > > > "You can loop over the instruction's operands to see if they are > contained in VMap" > > I have no clue of to do that, do you have an example ? > > > > 2012/6/21 Michael Ilseman <michael at lunarg.com> >> >> CloneBasicBlock does a fairly shallow cloning; the instructions >> themselves are cloned but their operands are not replaced with any >> previously cloned values. >> >> Example: >> orig: >>  %a = ... >>  %b = fadd %a, ... >> >> clone: >>  %a.clone = ... &...
2011 Apr 17
0
[LLVMdev] Regarding BasicBlock Cloning
On Sat, Apr 16, 2011 at 5:01 PM, tarun agrawal <tarun at cse.iitb.ac.in> wrote: > The clone llvm:CloneBasicBlock copies the phi function in the replicated > basic block from the original basic block. > I don't want the copy of phi in relplicated block. For now I am creating .bc > file with -O0 option so that it doesn't generate phi function in first > place. Is this a good approach or ther...
2011 Apr 17
0
[LLVMdev] Regarding BasicBlock Cloning
On 4/16/11 7:01 PM, tarun agrawal wrote: > The clone llvm:CloneBasicBlock copies the phi function in the > replicated basic block from the original basic block. After you clone the basic block, you can probably replace the phi instruction with another value of your choice. If you're adding variables, you'll probably want to create them as allocas and use...
2010 Jun 02
2
[LLVMdev] Duplicating a Basic Block
Hi, I want to duplicate a set of basic blocks and finally modify the structure of CFG. But if I just duplicate a block then name of all the temporaries will be same as in original block. So is there a way to rename all the temporaries in a basic block or I will have to do it instruction by instruction? Thanks and Regards, Ambika
2010 Jun 02
0
[LLVMdev] Duplicating a Basic Block
...ic blocks and finally modify the > structure of CFG. > But if I just duplicate a block then name of all the  temporaries will > be same as in original block. > > So is there a way to rename all the temporaries in a basic block or I > will have to do it instruction by instruction? CloneBasicBlock in llvm/Transforms/Utils/Cloning.h should perform cloning without having to worry about names. In general, LLVM will automatically rename an instruction if there is already an instruction with the same name in a function. How are you trying to duplicate the block? -Eli
2011 Apr 16
0
[LLVMdev] Regarding BasicBlock Cloning
...ication). I am facing following difficulties.. > > 1) I need to replicate the basic block but without phi function in the > replicated block. How can I do this. > > 2) I need to insert that basic block after and before some particular basic > block. You probably want to use llvm::CloneBasicBlock from Transforms/Utils/Cloning.h to get a cloned version of a block. BasicBlock::splitBasicBlock might be useful as well. -Eli
2011 May 03
2
[LLVMdev] BasicBlock Cloning
Hi I have clone a basic block using CloneBasicBlock function but it does not clone the predecessor with it. I am not able to figure out, how to set the predecessor of the cloned basic block. Tarun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110504/74cdc60...
2011 Apr 16
3
[LLVMdev] Regarding BasicBlock Cloning
Hi, I am writing a pass for constant propagation using graph restructuring ( code duplication). I am facing following difficulties.. 1) I need to replicate the basic block but without phi function in the replicated block. How can I do this. 2) I need to insert that basic block after and before some particular basic block. Regards Tarun Agrawal -------------- next part -------------- An HTML
2012 Jun 22
1
[LLVMdev] Cloning block for newbie
...ou can loop over the instruction's operands to see if they are > > contained in VMap" > > > > I have no clue of to do that, do you have an example ? > > > > > > > > 2012/6/21 Michael Ilseman <michael at lunarg.com> > >> > >> CloneBasicBlock does a fairly shallow cloning; the instructions > >> themselves are cloned but their operands are not replaced with any > >> previously cloned values. > >> > >> Example: > >> orig: > >> %a = ... > >> %b = fadd %a, ... > >> &g...
2015 Jul 11
7
[LLVMdev] instructions copy
Hi, I want to copy some dependent statements, like a = b, b = c, from one basicblock to another basicblocks. Because of SSA, a = b, will be like %1 = load %b, store %1, %a. If I just use clone() method in Instruction class, it will be like <badref> = load %b, store <badref>, %a. If I need remap the virtual registers, this map just will affect the whole module? And how to use it? I am
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
...urn void) and removing the cloned instruction. The part of the code that makes these changes is below: // This function, takes a basic block and clones it to another identical basic block, the only changes occur for the return instructions, which are replaced by ret void. BasicBlock *ProgSlicer::CloneBasicBlock(const BasicBlock *BB, DenseMap<const Value*, Value*> &ValueMap, const char *NameSuffix, Function *F) { BasicBlock *NewBB = new BasicBlock("", F); if (BB->hasName()) NewBB->setName(BB->getName()+NameSuffix);...
2010 Apr 15
0
[LLVMdev] Question About Cloning Machine Basic Block
On Wed, 2010-04-14 at 17:30 -0700, Hisham Chowdhury wrote: > > > > - Is there a utility to clone a MachineBasicBlock in LLVM > > > > > > There is CloneBasicBlock routine in ./lib/Transforms/Utils/CloneFunction.cpp - Sanjiv > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev