[LLVMbugs] Reassociation Transform
Chris Lattner
sabre at nondot.org
Thu Oct 31 09:25:15 PST 2002
> 3. ReassociateExpr was changing (a+b)+c into a+(b+c), which is a
> problem of the definition of c does not dominate (b+c). I fixed
> this by creating a new instruction for (b+c) and inserting it just
> before the instruction that calculates a+(b+c). I'm confident
> that this approach is correct, but may increase register pressure
> since it may extend the live ranges of b&c.
> 4. I wiggled the main loop in ReassociateBB around a bit to try and
> preserve instruction names. Placing the Sub test before the
> reassociate test makes the iterator manipulation simpler.
Sounds great to me. Note that this patch exposes a latent bug in
BinaryOperator::isNeg, so make sure you apply this as well:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20021028/001181.html
Here's the reassociate patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20021028/001182.html
Here we reenable reassociate in gccas:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20021028/001183.html
... and in the sparc backend:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20021028/001184.html
Thanks again!
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
More information about the llvm-bugs
mailing list