[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)
commit08829bac8160737d59a5e634758b2dbf18de67f1
treed32665fe7dd8f774eabd644eace570f572ed469a
parente7bd6defd71d24e9b58f18462bb32c92a355c05b
[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

llvm-svn: 239486
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InstrInfo.h
llvm/lib/Target/X86/X86TargetMachine.cpp
llvm/test/CodeGen/X86/fp-fast.ll