summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86MacroFusion.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-08-30 04:34:48 +0000
committerCraig Topper <craig.topper@intel.com>2017-08-30 04:34:48 +0000
commit641e2af9e8c41b11cda62c715909de882fd7915f (patch)
treec0af03f1d9b01aa260910876e428016457c7c4dd /llvm/lib/Target/X86/X86MacroFusion.cpp
parent3cb61634ff3795ef65b1f618d3809053b6a0a515 (diff)
downloadbcm5719-llvm-641e2af9e8c41b11cda62c715909de882fd7915f.tar.gz
bcm5719-llvm-641e2af9e8c41b11cda62c715909de882fd7915f.zip
[X86] Provide a separate feature bit for macro fusion support instead of basing it on the AVX flag
Summary: Currently we determine if macro fusion is supported based on the AVX flag as a proxy for the processor being Sandy Bridge". This is really strange as now AMD supports AVX. It also means if user explicitly disables AVX we disable macro fusion. This patch adds an explicit macro fusion feature. I've also enabled for the generic 64-bit CPU (which doesn't have AVX) This is probably another candidate for being in the MI layer, but for now I at least wanted to correct the overloading of the AVX feature. Reviewers: spatel, chandlerc, RKSimon, zvi Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37280 llvm-svn: 312097
Diffstat (limited to 'llvm/lib/Target/X86/X86MacroFusion.cpp')
-rw-r--r--llvm/lib/Target/X86/X86MacroFusion.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86MacroFusion.cpp b/llvm/lib/Target/X86/X86MacroFusion.cpp
index 8fdf1061705..d3ef7aa8d6c 100644
--- a/llvm/lib/Target/X86/X86MacroFusion.cpp
+++ b/llvm/lib/Target/X86/X86MacroFusion.cpp
@@ -27,10 +27,8 @@ static bool shouldScheduleAdjacent(const TargetInstrInfo &TII,
const MachineInstr *FirstMI,
const MachineInstr &SecondMI) {
const X86Subtarget &ST = static_cast<const X86Subtarget&>(TSI);
- // Check if this processor supports macro-fusion. Since this is a minor
- // heuristic, we haven't specifically reserved a feature. hasAVX is a decent
- // proxy for SandyBridge+.
- if (!ST.hasAVX())
+ // Check if this processor supports macro-fusion.
+ if (!ST.hasMacroFusion())
return false;
enum {
OpenPOWER on IntegriCloud