Enable MI Sched for x86.
authorAndrew Trick <atrick@apple.com>
Tue, 15 Oct 2013 23:33:07 +0000 (23:33 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 15 Oct 2013 23:33:07 +0000 (23:33 +0000)
commit6a7770b7ae43d784dec6f4d3c73ffed6166f3882
tree289f5949305117ae55c95f997e9f6e50b28b5ece
parentc622824ccbb74ac726c656ebc98647810d152cce
Enable MI Sched for x86.

This changes the SelectionDAG scheduling preference to source
order. Soon, the SelectionDAG scheduler can be bypassed saving
a nice chunk of compile time.

Performance differences that result from this change are often a
consequence of register coalescing. The register coalescer is far from
perfect. Bugs can be filed for deficiencies.

On x86 SandyBridge/Haswell, the source order schedule is often
preserved, particularly for small blocks.

Register pressure is generally improved over the SD scheduler's ILP
mode. However, we are still able to handle large blocks that require
latency hiding, unlike the SD scheduler's BURR mode. MI scheduler also
attempts to discover the critical path in single-block loops and
adjust heuristics accordingly.

The MI scheduler relies on the new machine model. This is currently
unimplemented for AVX, so we may not be generating the best code yet.

Unit tests are updated so they don't depend on SD scheduling heuristics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192750 91177308-0d34-0410-b5e6-96231b3b80d8
67 files changed:
lib/Target/X86/X86Subtarget.h
test/CodeGen/X86/2006-05-02-InstrSched1.ll
test/CodeGen/X86/2007-01-08-InstrSched.ll
test/CodeGen/X86/2009-02-26-MachineLICMBug.ll
test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll
test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll
test/CodeGen/X86/2011-10-19-LegelizeLoad.ll
test/CodeGen/X86/2012-04-26-sdglue.ll
test/CodeGen/X86/3addr-16bit.ll
test/CodeGen/X86/StackColoring.ll
test/CodeGen/X86/abi-isel.ll
test/CodeGen/X86/add.ll
test/CodeGen/X86/alloca-align-rounding.ll
test/CodeGen/X86/avx-arith.ll
test/CodeGen/X86/avx-intel-ocl.ll
test/CodeGen/X86/avx-shuffle.ll
test/CodeGen/X86/avx512-cvt.ll
test/CodeGen/X86/avx512-mask-op.ll
test/CodeGen/X86/break-anti-dependencies.ll
test/CodeGen/X86/bt.ll
test/CodeGen/X86/byval7.ll
test/CodeGen/X86/chain_order.ll
test/CodeGen/X86/cmov.ll
test/CodeGen/X86/commute-two-addr.ll
test/CodeGen/X86/fast-isel-mem.ll
test/CodeGen/X86/fastcc.ll
test/CodeGen/X86/fold-load.ll
test/CodeGen/X86/fold-pcmpeqd-2.ll
test/CodeGen/X86/full-lsr.ll
test/CodeGen/X86/gather-addresses.ll
test/CodeGen/X86/ghc-cc.ll
test/CodeGen/X86/ghc-cc64.ll
test/CodeGen/X86/hipe-cc.ll
test/CodeGen/X86/hipe-cc64.ll
test/CodeGen/X86/lea-recursion.ll
test/CodeGen/X86/lea.ll
test/CodeGen/X86/load-slice.ll
test/CodeGen/X86/lsr-loop-exit-cond.ll
test/CodeGen/X86/masked-iv-safe.ll
test/CodeGen/X86/memcpy-2.ll
test/CodeGen/X86/pmul.ll
test/CodeGen/X86/pr14088.ll
test/CodeGen/X86/pr1505b.ll
test/CodeGen/X86/pr16031.ll
test/CodeGen/X86/pre-ra-sched.ll
test/CodeGen/X86/rdrand.ll
test/CodeGen/X86/rdseed.ll
test/CodeGen/X86/segmented-stacks-dynamic.ll
test/CodeGen/X86/select.ll
test/CodeGen/X86/shift-bmi2.ll
test/CodeGen/X86/sink-hoist.ll
test/CodeGen/X86/sse2.ll
test/CodeGen/X86/store-narrow.ll
test/CodeGen/X86/tailcall-largecode.ll
test/CodeGen/X86/test-nofold.ll
test/CodeGen/X86/trunc-to-bool.ll
test/CodeGen/X86/v-binop-widen.ll
test/CodeGen/X86/v-binop-widen2.ll
test/CodeGen/X86/vec_shuffle-27.ll
test/CodeGen/X86/vec_shuffle-39.ll
test/CodeGen/X86/widen_cast-1.ll
test/CodeGen/X86/win64_alloca_dynalloca.ll
test/CodeGen/X86/x86-64-psub.ll
test/CodeGen/X86/x86-shifts.ll
test/CodeGen/X86/zext-fold.ll
test/CodeGen/X86/zext-sext.ll
test/DebugInfo/X86/dbg-value-dag-combine.ll