similar to: [LLVMdev] Detailed help with cloning the basic blocks of a function

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Detailed help with cloning the basic blocks of a function"

2012 Jun 21
0
[LLVMdev] Cloning block for newbie
Please reply-all so that the thread is kept on llvmdev. The LLVM Programmer's Manual has examples of how to iterate over many common structures, such as instructions in a basic block[1]. Other than that, you can check the source code or doxygen[2]. Basically, you loop over the instructions as detailed in the programmer's manual[1], and loop over the operands using User's
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
2012 Jun 22
1
[LLVMdev] Cloning block for newbie
Thank you for your help. It's working now. I wasn't aware of the usefulness of the User class. The ValueMapper.cpp's "RemapInstruction()" also helped me a lot to remap phi nodes and metadatas. Thank you very much. 2012/6/21 Michael Ilseman <michael at lunarg.com> > Please reply-all so that the thread is kept on llvmdev. > > The LLVM Programmer's Manual
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 function available for it. Tarun On Sun, Apr 17, 2011 at 5:22 AM, Eli
2008 Apr 16
0
[LLVMdev] Problems in removing a cloned instruction.
Hi, I'm gonna try to give some feedback, but I have only been working with LLVM for a few days, so don't take what I'm saying without verifying :-) > BasicBlock *ProgSlicer::CloneBasicBlock(const BasicBlock *BB, > DenseMap<const Value*, Value*> &ValueMap, > const char *NameSuffix, Function *F) { > > BasicBlock
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
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
Hi all, I am trying to write a pass where i am creating a clone of a function (the only difference being, the new function returns void , instead of any value). I am creating a new Function Type with a void return type (rest being the same as original function), and using this i am creating a new function body. Then, i clone the body of the old function into new function, but when ever i
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 loads and stores to
2011 Apr 16
0
[LLVMdev] Regarding BasicBlock Cloning
On Sat, Apr 16, 2011 at 4:32 PM, tarun agrawal <tarun at cse.iitb.ac.in> wrote: > 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
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/74cdc609/attachment.html>
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
2011 May 04
0
[LLVMdev] BasicBlock Cloning
On 5/3/11 4:14 PM, tarun agrawal wrote: > 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. LLVM's CFG is explicitly maintained by the terminator instructions within each basic block. In order to change the CFG, you have to
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.
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.end29 ], [ %no_final.055, %sw.bb20 ], [ %no_final.055, %sw.bb15 ], [
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(); ..
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
2017 Jun 20
2
CloneFunctionInto produces invalid debug info
I was just going to say: With well-formed debug info it should create a deep copy up until the DISubprogram, but no further. But because the DISubprogram linked to the Function is missing the special handling of the DISubprogram (that would prohibit cloning the DICompileUnit is side-stepped). But then I remembered the discussion we had in
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
2010 Jun 02
0
[LLVMdev] Duplicating a Basic Block
On Wed, Jun 2, 2010 at 12:24 PM, ambika <ambika at cse.iitb.ac.in> wrote: > 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
2010 Apr 15
1
[LLVMdev] Question About Cloning Machine Basic Block
  Hello, I am trying to clone a machine basic block when I ran into some issues, where I am not able to make some headway. Any of yours help is highly appreciated here: My question is about Machine Basic Block Duplication:   -          Is there a utility to clone a MachineBasicBlock in LLVM? I found utility to clone machineInstrs, but couldn’t find similar utility for MachineBasicBlock. So, I