[LLVMdev] Asserts in bundleWithPred() and bundleWithSucc()

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Feb 4 15:16:47 PST 2013


On Feb 4, 2013, at 3:02 PM, "Sergei Larin" <slarin at codeaurora.org> wrote:

> Jakob,
> 
>> ... In this case you should either erase the old BUNDLE first, or unbundle
> it
>> from the instructions you are trying to finalize.
> 
> This is exactly my point - I have to unbundle everything to re-bundle it
> back in :) ...but this case is trivial and I am OK with it. What is more
> unclear to me is this. 
> 
> How do you use Bundle.insert(I, MI->removeFromBundle())
> 
> Where MI == Bundle.End?
> 
> This happens if I want to add unbundled instruction to a bundle that
> immediately precedes it in the same BB. The moment you remove MI from BB
> iterators will not work properly.

Yes, that is a problem because MIBundleBuilder keeps an End iterator.

What do you think, should we add a Bundle.moveIntoBundle() function?

/jakob




More information about the llvm-dev mailing list