Move late partial-unrolling thresholds into the processor definitions
authorHal Finkel <hfinkel@anl.gov>
Thu, 8 May 2014 09:14:44 +0000 (09:14 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 8 May 2014 09:14:44 +0000 (09:14 +0000)
commitf35ce2376ca361e059ad9390ce1f8467f8756bcd
tree9017e3a9ba985d57a49d43544353c097755c951b
parentf46646d87beafcddd3778338a913d6cd3ff19179
Move late partial-unrolling thresholds into the processor definitions

The old method used by X86TTI to determine partial-unrolling thresholds was
messy (because it worked by testing target features), and also would not
correctly identify the target CPU if certain target features were disabled.
After some discussions on IRC with Chandler et al., it was decided that the
processor scheduling models were the right containers for this information
(because it is often tied to special uop dispatch-buffer sizes).

This does represent a small functionality change:
 - For generic x86-64 (which uses the SB model and, thus, will get some
   unrolling).
 - For AMD cores (because they still currently use the SB scheduling model)
 - For Haswell (based on benchmarking by Louis Gerbarg, it was decided to bump
   the default threshold to 50; we're working on a test case for this).
Otherwise, nothing has changed for any other targets. The logic, however, has
been moved into BasicTTI, so other targets may now also opt-in to this
functionality simply by setting LoopMicroOpBufferSize in their processor
model definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208289 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCSchedule.h
include/llvm/Target/TargetSchedule.td
lib/CodeGen/BasicTargetTransformInfo.cpp
lib/Target/X86/X86SchedHaswell.td
lib/Target/X86/X86SchedSandyBridge.td
lib/Target/X86/X86ScheduleAtom.td
lib/Target/X86/X86ScheduleSLM.td
lib/Target/X86/X86TargetTransformInfo.cpp
test/Transforms/LoopUnroll/X86/partial.ll
test/Transforms/LoopVectorize/X86/metadata-enable.ll
utils/TableGen/SubtargetEmitter.cpp