[x86] Add a reassociation optimization to increase ILP via the MachineCombiner pass
authorSanjay Patel <spatel@rotateright.com>
Wed, 10 Jun 2015 20:32:21 +0000 (20:32 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 10 Jun 2015 20:32:21 +0000 (20:32 +0000)
commitc826b54b526e3d7cff34340bb45a3aa5cc0ab5a6
treeb6c2be26200c863656a8ee92ef366d00d8c93643
parentbb79423d0f1e68cf5bd4b8e8c998bd1973e37ee1
[x86] Add a reassociation optimization to increase ILP via the MachineCombiner pass

This is a reimplementation of D9780 at the machine instruction level rather than the DAG.

Use the MachineCombiner pass to reassociate scalar single-precision AVX additions (just a
starting point; see the TODO comments) to increase ILP when it's safe to do so.

The code is closely based on the existing MachineCombiner optimization that is implemented
for AArch64.

This patch should not cause the kind of spilling tragedy that led to the reversion of r236031.

Differential Revision: http://reviews.llvm.org/D10321

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239486 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/fp-fast.ll