On Tue, 3 Aug 2004, Chris Lattner wrote:> > > Compiling InstrSelectorEmitter.cpp > > InstrSelectorEmitter.cpp: In member function `virtual void > > llvm::InstrSelectorEmitter::run(std::ostream&)': > > InstrSelectorEmitter.cpp:1295: internal compiler error: in > > convert_from_eh_region_ranges_1, at except.c:1159 > > Please submit a full bug report, > > GCC 3.3.2 is not compatible with LLVM, sorry!FWIW, GCC 3.4.0 works and is installed on the research machines in /home/vadve/shared/localtools/fc1.> > -Chris > > > with preprocessed source if appropriate. > > See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. > > Preprocessed source stored into /tmp/ccbMwLuD.out file, please attach this to your bugreport > > </snip> > > > > As is my usual approach to internal compiler errors I tried to compile it a second time and received the same error. If anyone knows what is going on and how to fix it I would appreciate it ;) > > > > ~Patrick > > -Chris > > -- > http://llvm.cs.uiuc.edu/ > http://nondot.org/sabre/ > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >-- John T. ********************************************************************* * John T. Criswell Email: criswell at uiuc.edu * * Research Programmer * * University of Illinois at Urbana-Champaign * * * * "It's today!" said Piglet. "My favorite day," said Pooh. * *********************************************************************
> Compiling InstrSelectorEmitter.cpp > InstrSelectorEmitter.cpp: In member function `virtual void > llvm::InstrSelectorEmitter::run(std::ostream&)': > InstrSelectorEmitter.cpp:1295: internal compiler error: in > convert_from_eh_region_ranges_1, at except.c:1159 > Please submit a full bug report,GCC 3.3.2 is not compatible with LLVM, sorry! -Chris> with preprocessed source if appropriate. > See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. > Preprocessed source stored into /tmp/ccbMwLuD.out file, please attach this to your bugreport > </snip> > > As is my usual approach to internal compiler errors I tried to compile it a second time and received the same error. If anyone knows what is going on and how to fix it I would appreciate it ;) > > ~Patrick-Chris -- http://llvm.cs.uiuc.edu/ http://nondot.org/sabre/
How does one move instructions from one basic block to another? I tried this: (IB is an Instruction* as is current_last, current_BB is a BasicBlock*) IB->getParent()->getInstList().remove(IB); current_BB->getInstList().insert(current_last, IB); and I get this assertion: Assertion `V->getParent() == 0 && "Value already in a container!!"' failed. it seems to me that remove should remove it from it's container....
On Wed, Aug 04, 2004 at 07:03:34AM -0500, Patrick Meredith wrote:> IB->getParent()->getInstList().remove(IB); > current_BB->getInstList().insert(current_last, IB); > > and I get this assertion: > Assertion `V->getParent() == 0 && "Value already in a container!!"' > failed. > > it seems to me that remove should remove it from it's container....You want to use `erase' instead of `remove'. See http://llvm.cs.uiuc.edu/docs/ProgrammersManual.html#schanges_deleting -- Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
On Wed, 4 Aug 2004, Patrick Meredith wrote:> How does one move instructions from one basic block to another? I tried > this: > (IB is an Instruction* as is current_last, current_BB is a BasicBlock*) > > IB->getParent()->getInstList().remove(IB); > current_BB->getInstList().insert(current_last, IB); > > and I get this assertion: > Assertion `V->getParent() == 0 && "Value already in a container!!"' failed. > it seems to me that remove should remove it from it's container....The problem you're having is that remove returns in the instruction and invalidates its argument. "IB" does not point to the instruction any longer, in fact, it gets invalidated by the operation. Try this: Instruction *I = IB->getParent()->getInstList().remove(IB); current_BB->getInstList().insert(current_last, I); Alternatively, you can use splice, which is a little more efficient: current_BB->getInstList().splice(current_last, IB->getParent()->getInstList(), IB); splice is a bit more efficient than remove/insert because it doesn't bother to take the symbol out of the function symbol table (unless of course you're splicing into a different function). Good descriptions of splice can be found in STL references for the list class. -Chris -- http://llvm.cs.uiuc.edu/ http://nondot.org/sabre/