search for: addnodetolist

Displaying 15 results from an estimated 15 matches for "addnodetolist".

2010 Jan 13
2
[LLVMdev] How to create forward reference to BasicBlock?
......) bb.eraseFromParent() ... add other blocks to function and build instructions in those blocks ... function.getBasicBlockList.push_back(bb) but I get an assert failure from push_back: t1: SymbolTableListTraitsImpl.h:68: void llvm::SymbolTableListTraits<ValueSubClass, ItemParentClass>::addNodeToList(ValueSubClass*) [with ValueSubClass = llvm::BasicBlock, ItemParentClass = llvm::Function]: Assertion `V->getParent() == 0 && "Value already in a container!!"' failed. Should I expect this to work? Can a BasicBlock only exist within a Function's basic block list? Is the...
2013 Jul 30
2
[LLVMdev] Instruction insertion By Module Pass
...is 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, llvm::BasicBlock>::addNodeToList(ValueSubClass *) [ValueSubClass = llvm::Instruction, ItemParentClass = llvm::BasicBlock]: Assertion `V->getParent() == 0 && "Value already in a container!!"' failed. Is there a class I could use to insert while loop in Module Pass? Thank you in advance -- * Rasha S...
2010 Jan 13
0
[LLVMdev] How to create forward reference to BasicBlock?
...s to function and build instructions in those blocks > ... > > function.getBasicBlockList.push_back(bb) > > > but I get an assert failure from push_back: > > t1: SymbolTableListTraitsImpl.h:68: void > llvm::SymbolTableListTraits<ValueSubClass, > ItemParentClass>::addNodeToList(ValueSubClass*) [with ValueSubClass = > llvm::BasicBlock, ItemParentClass = llvm::Function]: Assertion > `V->getParent() == 0 && "Value already in a container!!"' failed. > > Should I expect this to work? Can a BasicBlock only exist within a > Function's...
2013 Jul 30
0
[LLVMdev] Instruction insertion By Module Pass
...d time with the last line. Note that the assertion is telling you that you're inserting the alloca instruction twice. Remove the last line, and it should fix your problem. -- John T. > > the error: > void llvm::SymbolTableListTraits<llvm::Instruction, > llvm::BasicBlock>::addNodeToList(ValueSubClass *) [ValueSubClass = > llvm::Instruction, ItemParentClass = llvm::BasicBlock]: Assertion > `V->getParent() == 0 && "Value already in a container!!"' failed. > > Is there a class I could use to insert while loop in Module Pass? > > Thank you...
2013 Jul 31
1
[LLVMdev] Instruction insertion By Module Pass
...Note that the assertion is telling > you that you're inserting the alloca instruction twice. > > Remove the last line, and it should fix your problem. > > -- John T. > > > the error: > void llvm::SymbolTableListTraits<llvm::Instruction, > llvm::BasicBlock>::addNodeToList(ValueSubClass *) [ValueSubClass = > llvm::Instruction, ItemParentClass = llvm::BasicBlock]: Assertion > `V->getParent() == 0 && "Value already in a container!!"' failed. > > Is there a class I could use to insert while loop in Module Pass? > > Thank you...
2004 May 21
1
[LLVMdev] Re: LLVMdev digest, Vol 1 #292 - 4 msgs
...; BB->getInstList().insert(InsertPos,InstrCall); Error inforamtion: %opt -load ../../lib/Debug/libcntPass.so -cntPass<insert.bc -f -o i.bc BB name : entry opt: SymbolTableListTraitsImpl.h:53: void llvm::SymbolTableListTraits<ValueSubClass, ItemParentClass, SymTabClass, SubClass>::addNodeToList(ValueSubClass*) [with ValueSubClass = llvm::Instruction, ItemParentClass = llvm::BasicBlock, SymTabClass = llvm::Function, SubClass = llvm::ilist_traits<llvm::Instruction>]: Assertion `V->getParent() == 0 && "Value already in a container!!"' failed. opt[0x860c190] opt...
2012 Oct 08
0
[LLVMdev] Inserting a function call using LLVM
Hi Teja, > I am new to LLVM and interested in using LLVM to work on a research project for > my Master's degree. > My idea is following - > > 1. I have a simple C program basic.c - > #include <stdio.h> > int main() { > printf("Hello World"); > return 0; > } > > 2. I will generate IR byte code for this basic.c using - > llvm-gcc
2012 Oct 07
2
[LLVMdev] Inserting a function call using LLVM
Hi, I am new to LLVM and interested in using LLVM to work on a research project for my Master's degree. My idea is following - 1. I have a simple C program basic.c - #include <stdio.h> int main() { printf("Hello World"); return 0; } 2. I will generate IR byte code for this basic.c using - llvm-gcc -emit-llvm -S basic.c This will give me basic.s which has IR byte code
2013 Feb 04
2
[LLVMdev] Asserts in bundleWithPred() and bundleWithSucc()
...instruction to a bundle that immediately precedes it in the same BB. The moment you remove MI from BB iterators will not work properly... and if you do not remove it first, MBB.insert(I, MI); will assert with: lib/CodeGen/MachineBasicBlock.cpp:94: void llvm::ilist_traits<llvm::MachineInstr>::addNodeToList(llvm::MachineInstr*): Assertion `N->getParent() == 0 && "machine instruction already in a basic block"' failed. Sergei --- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation > -----Original Message----- > From: Jako...
2013 Feb 04
0
[LLVMdev] Asserts in bundleWithPred() and bundleWithSucc()
On Feb 4, 2013, at 8:59 AM, "Sergei Larin" <slarin at codeaurora.org> wrote: > Jakob, > >> The intention was to identify code that may have been converted from >> the old style a little too quickly. I wanted to avoid bugs from a >> global s/setIsInsideBundle/bundleWithPred/g search and replace. > > This is a good intent. Maybe a bit temporal but
2010 Feb 07
3
[LLVMdev] Help with Mac OS X 10.6.2 build
...is not of required architecture ld: warning: in /opt/llvm/lib/libLLVMSupport.a, file is not of required architecture ld: warning: in /opt/llvm/lib/libLLVMSystem.a, file is not of required architecture Undefined symbols: "llvm::SymbolTableListTraits<llvm::Instruction, llvm::BasicBlock>::addNodeToList(llvm::Instruction*)", referenced from: BinaryExprAST::Codegen() in ccHkdHVT.o BinaryExprAST::Codegen() in ccHkdHVT.o CallExprAST::Codegen() in ccHkdHVT.o FunctionAST::Codegen() in ccHkdHVT.o llvm::IRBuilder<true, llvm::ConstantFolder>::In...
2010 Jul 16
0
[LLVMdev] Win32 COFF Support - Patch 3
...> + if (SymbolDataCreated) > + OnSymbolDataCreated(Symbol, SymbolData); > + > + return SymbolData; > +} > + > +void WinCOFFStreamer::AddFragment(MCFragment *Fragment) { > + MCSectionData *SectionData = getSectionData(); > + > + SectionData->getFragmentList().addNodeToList(Fragment); > +} > + > +void WinCOFFStreamer::VisitSymbols(MCExpr const *Expr) { This function is equivalent to MCMachOStreamer::AddValueSymbols; please just copy that version with a FIXME to refactor it into the base class (or go ahead and do the refactoring). > + switch (Expr->ge...
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote: > This probably needs to be slightly tweaked to work with mainline.  I don't see anything objectionable, but I think Daniel needs to review this one. Updated patch to work with mainline. http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94 - Michael Spencer
2013 Feb 04
2
[LLVMdev] Asserts in bundleWithPred() and bundleWithSucc()
Jakob, > The intention was to identify code that may have been converted from > the old style a little too quickly. I wanted to avoid bugs from a > global s/setIsInsideBundle/bundleWithPred/g search and replace. This is a good intent. Maybe a bit temporal but sound nevertheless. > finalizeBundle is calling 'MIBundleBuilder Bundle(MBB, FirstMI, > LastMI)' which ought to
2010 Feb 07
0
[LLVMdev] Help with Mac OS X 10.6.2 build
...ld: warning: in /opt/llvm/lib/libLLVMSupport.a, file is not of > required architecture > ld: warning: in /opt/llvm/lib/libLLVMSystem.a, file is not of required > architecture > Undefined symbols: > "llvm::SymbolTableListTraits<llvm::Instruction, > llvm::BasicBlock>::addNodeToList(llvm::Instruction*)", referenced > from: > BinaryExprAST::Codegen() in ccHkdHVT.o > BinaryExprAST::Codegen() in ccHkdHVT.o > CallExprAST::Codegen() in ccHkdHVT.o > FunctionAST::Codegen() in ccHkdHVT.o > llvm::IRBuilder&lt...