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

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Feb 1 16:14:57 PST 2013


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

> I have a question about the following (four) asserts recently added in
> bundleWithPred() and bundleWithSucc() (see below). What is the real danger
> of reasserting a connection even if it already exist?

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.

> My problem with them
> happens when I try to call finalizeBundle() on an existing bundle to which I
> have added a new instruction. The goal - a new bundle header with liveness
> abbreviation, but because of these asserts I now have to unbundle all, and
> re-bundle them right back again for no obvious benefit...

finalizeBundle is calling 'MIBundleBuilder Bundle(MBB, FirstMI, LastMI)' which ought to work with pre-bundled instructions. FirstMI and LastMI must be pointing at bundle boundaries, but you shouldn't need to unbundle everything.

Which iterators are you passing to finalizeBundle?

/jakob




More information about the llvm-dev mailing list