[llvm-commits] [llvm] r122654 - in /llvm/trunk: lib/Analysis/InstructionSimplify.cpp lib/Target/README.txt test/Transforms/InstSimplify/2010-12-31-ValueNumber.ll

Chris Lattner clattner at apple.com
Sat Jan 1 11:06:51 PST 2011

On Jan 1, 2011, at 8:12 AM, Duncan Sands wrote:

> Author: baldrick
> Date: Sat Jan  1 10:12:09 2011
> New Revision: 122654
> URL: http://llvm.org/viewvc/llvm-project?rev=122654&view=rev
> Log:
> Fix a README item by having InstructionSimplify do a mild form of value
> numbering, in which it considers (for example) "%a = add i32 %x, %y" and
> "%b = add i32 %x, %y" to be equal because the operands are equal and the
> result of the instructions only depends on the values of the operands.
> This has almost no effect (it removes 4 instructions from gcc-as-one-file),
> and perhaps slows down compilation: I measured a 0.4% slowdown on the large
> gcc-as-one-file testcase, but it wasn't statistically significant.

Duncan, please don't do this. InstSimplify should *not* do CSE, which is what the README entry is about.  I should not have added the readme entry as I did, because the actual issue is lack of early CSE.  I have another way to fix this, which I'll be tackling shortly.


More information about the llvm-commits mailing list