similar to: [LLVMdev] Problems in removing a cloned instruction.

Displaying 20 results from an estimated 600 matches similar to: "[LLVMdev] Problems in removing a cloned instruction."

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
2005 Nov 22
3
[LLVMdev] Cloning BasicBlock
Hi , I am trying to clone a BasicBlock. I want both to co-exist and I have introduced a conditional branch to the original or the cloned BB. I tried mapping the original instruction and the clone as below : Instruction *NewInst = II->clone(); if (II->hasName()) NewInst->setName(II->getName()); NewBB->getInstList().push_back(NewInst); ValueMap[II] =
2019 Oct 30
2
How to make ScalarEvolution recompute SCEV values?
Hello all, I’m pretty new to LLVM. I'm writing a pass for loop optimization. I clone and rearrange loops, setting the cloned loop as the original loop’s parent. This can be done multiple times, until there is no more work to do. The trouble is, after the first time I do this, the cloned loop's SCEVs become unknown types when they should be AddRecExpr. If I re-run the whole pass on the
2005 Nov 22
0
[LLVMdev] Cloning BasicBlock
On Tue, 2005-11-22 at 09:12 -0800, Sandra Johnson wrote: > Hi , > I am trying to clone a BasicBlock. I want both to co-exist and I have > introduced > a conditional branch to the original or the cloned BB. I have a pass I haven't commited that does just this. Well, it does so to implement Arnold and Ryder style profiling. I can send you a copy of that if you want (I hope to
2005 Nov 23
1
[LLVMdev] Cloning BasicBlock
Hello Andrew , Yes , I have missed the phi node since my paths merge together. I'll try this out. I am implementing a timer based profiling scheme and hope your code will be useful for me. Please send me a copy of your code. Thanks Sandra Andrew Lenharth <andrewl at lenharth.org> wrote: On Tue, 2005-11-22 at 09:12 -0800, Sandra Johnson wrote: > Hi , > I am trying
2013 Jul 25
2
[LLVMdev] Error for AllocaInst and Instruction
Hi, For the following code const Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext()); AllocaInst* newInst = new AllocaInst(Int32Type, 0, "flag", Bb); Bb->getInstList().push_back(newInst); It gives me the error " error: no matching constructor for initialization of 'llvm::AllocaInst' AllocaInst* newInst = new
2005 May 11
3
[LLVMdev] Question About inserting Instruction?
Hi, I am working on a project with LLVM. What I need to do is to generate/insert some dummy/dead basic blocls which never have chance to be executed and put some instructions in those dummy/dead basic blocks. So far, the dummy/dead BB insertion is done. I am trying insert instructions in those dummy/dead BB. Actually, I can insert the legal instructions to dummy/dead BB, however, I really want
2009 Nov 05
2
[LLVMdev] Debug Information for LLVM 2.6 and TOT
Devang Patel wrote: > Hi John, > > On Wed, Nov 4, 2009 at 12:04 PM, John Criswell <criswell at uiuc.edu> wrote: > >> Dear All, >> >> 1) I recall reading somewhere that a few optimizations in LLVM 2.6 strip >> away debug information when such information interferes with >> optimization. Is this correct, >> > > Yes. > >
2011 Jan 24
3
[LLVMdev] How to change the type of an Instruction?
Hi, Nick, thanks for the reply. I still have a problem: I only need to "clone" an Instruction, changing its type. That is, I would like to keep all characteristics of the old Instruction and create a new one only with a different type. I am trying create a new Instruction thus: %3 = add nsw i32 %1, %2 ; <i16> [#uses=2] //Old Instruction Value* Op0 = I->getOperand(0); Value*
2009 Jan 22
0
[LLVMdev] replacing instructions
Ralf Karrenberg wrote: > Hello everyone, > > is there any way to replace an instruction inside LLVM that is more > elegant than creating a new one, replacing uses and deleting the old one > if I only want to modify the type? It is generally not a big deal, but > the issue gets really messy if I am in the middle of iterating over uses > and start deleting some of them... >
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(); ..
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,
2011 Jan 24
0
[LLVMdev] How to change the type of an Instruction?
On 01/24/2011 04:41 AM, Douglas do Couto Teixeira wrote: > Hi, > > Nick, thanks for the reply. > I still have a problem: I only need to "clone" an Instruction, changing > its type. That is, I would like to keep all characteristics of the old > Instruction and create a new one only with a different type. Sure, but what about its operands? An "add" instruction
2011 Jan 24
3
[LLVMdev] How to change the type of an Instruction?
On Mon, Jan 24, 2011 at 3:01 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > On 01/24/2011 04:41 AM, Douglas do Couto Teixeira wrote: > >> Hi, >> >> Nick, thanks for the reply. >> I still have a problem: I only need to "clone" an Instruction, changing >> its type. That is, I would like to keep all characteristics of the old >> Instruction
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
2008 Jul 21
2
[LLVMdev] Casting between address spaces and address space semantics
Hi all, > If I read the standard correctly, the properties of these address spaces can > be fully captured by defining the relationship between every pair of address > spaces (disjoint, identical, subset/superset). > > I think it would make sense to make these relationships backend/platform > specific, but for clang and the optimization passes to properly work with > address
2011 Jan 21
0
[LLVMdev] How to change the type of an Instruction?
On 21 January 2011 12:56, Douglas do Couto Teixeira < douglasdocouto at gmail.com> wrote: > Hello guys, > > I wonder how I can change the type of an integer variable. For instance, > given the instruction "%3 = add i32 %1, %2" I would like to alter the > instruction to "%3 = add i16 %1, %2". Is there any way to do this? > No. Instead you create a new
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
2010 May 13
1
[LLVMdev] Attention: About to Break SystemZ and possibly other Back Ends
Hi, Attached is a patch I'm testing. It changes how "MachineFrameInfo::HasCalls" is calculated. Basically, the way it's calculated now is in PEI. And it only looks for frame adjustments (or inline ASM) to determine if the function has a call or not. This way is much more accurate and occurs much sooner. But it breaks this test:
2011 Jan 24
0
[LLVMdev] How to change the type of an Instruction?
On 1/24/11 12:05 PM, Douglas do Couto Teixeira wrote: > > > On Mon, Jan 24, 2011 at 3:01 PM, Nick Lewycky <nicholas at mxc.ca > <mailto:nicholas at mxc.ca>> wrote: > > On 01/24/2011 04:41 AM, Douglas do Couto Teixeira wrote: > > Hi, > > Nick, thanks for the reply. > I still have a problem: I only need to "clone" an