[LLVMdev] Asserts in bundleWithPred() and bundleWithSucc()
Sergei Larin
slarin at codeaurora.org
Mon Feb 4 15:44:09 PST 2013
Jakob,
Seems like an easy solution for this case... But let me ask you a more
general question.
The reason I kept on hanging on to the MBB->splice was (probably outdated)
assumption that it will one day properly update liveness for instructions it
moves... That is a serious matter for what I am trying to do (global code
motion in presence of bundles).
What is the current thinking? Will we ever be able to move an instruction
between BBs and have liveness updated properly? If so, what interface will
we need for that? Based on your answer, original question might become a bit
more easy to answer.
Sergei
---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation
> -----Original Message-----
> From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk]
> Sent: Monday, February 04, 2013 5:17 PM
> To: Sergei Larin
> Cc: llvmdev at cs.uiuc.edu
> Subject: Re: Asserts in bundleWithPred() and bundleWithSucc()
>
>
> 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