[LLVMdev] Loop simplification
Frits van Bommel
fvbommel at gmail.com
Tue Feb 1 15:43:49 PST 2011
On Tue, Feb 1, 2011 at 10:08 PM, Andrew Clinton <andrew at sidefx.com> wrote:
> I have a (non-entry) basic block that contains only PHI nodes and an
> unconditional branch (that does not branch to itself). Is it always
> possible to merge this block with it's successor and produce a
> semantically equivalent program?
I don't think that's always possible.
For example: if a phi in the successor has a phi in the predecessor as
one of it's incoming values, then the predecessor cases have to be
merged into the successor phi. However, if they share a predecessor
but have different incoming values for it that can't be done.
More information about the llvm-dev
mailing list