[llvm-commits] [llvm] r156323 - in /llvm/trunk: lib/Transforms/Scalar/Reassociate.cpp test/Transforms/Reassociate/fp-commute.ll

Owen Anderson resistor at mac.com
Tue May 8 10:17:29 PDT 2012


Duncan,

On May 8, 2012, at 12:43 AM, Duncan Sands <baldrick at free.fr> wrote:

>> Teach reassociate to commute FMul's and FAdd's in order to canonicalize the order of their operands across instructions.  This allows for greater CSE opportunities.
> 
> this doesn't really have anything to do with reassociation...  so why put it
> here?  Is it because you want to use getRank?  Instcombine has getComplexity -
> maybe that should be boosted instead?  Is it that getRank is too expensive for
> instcombine?

Dan suggested doing it in reassociate, because he thought the rank ordering was a good one to use, given its consistency across runs.

--Owen



More information about the llvm-commits mailing list