summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM64
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-05-21 23:40:26 +0000
committerEric Christopher <echristo@gmail.com>2014-05-21 23:40:26 +0000
commit6b0fcfee36069c8b5b9216935df8632245c0898f (patch)
tree8e874db26d0970fac0ab85bd8e9d4dbb02f4b4d0 /llvm/lib/Target/ARM64
parented19bad61749170a489c033120737de0f53fc763 (diff)
downloadbcm5719-llvm-6b0fcfee36069c8b5b9216935df8632245c0898f.tar.gz
bcm5719-llvm-6b0fcfee36069c8b5b9216935df8632245c0898f.zip
Make early if conversion dependent upon the subtarget and add
a subtarget hook to enable. Unconditionally add to the pass pipeline for targets that might want to use it. No functional change. llvm-svn: 209340
Diffstat (limited to 'llvm/lib/Target/ARM64')
-rw-r--r--llvm/lib/Target/ARM64/ARM64Subtarget.cpp8
-rw-r--r--llvm/lib/Target/ARM64/ARM64Subtarget.h2
-rw-r--r--llvm/lib/Target/ARM64/ARM64TargetMachine.cpp7
3 files changed, 11 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64Subtarget.cpp b/llvm/lib/Target/ARM64/ARM64Subtarget.cpp
index 528cfc97cbf..d81e21b51df 100644
--- a/llvm/lib/Target/ARM64/ARM64Subtarget.cpp
+++ b/llvm/lib/Target/ARM64/ARM64Subtarget.cpp
@@ -26,6 +26,10 @@ using namespace llvm;
#define GET_SUBTARGETINFO_TARGET_DESC
#include "ARM64GenSubtargetInfo.inc"
+static cl::opt<bool>
+EnableEarlyIfConvert("arm64-early-ifcvt", cl::desc("Enable the early if "
+ "converter pass"), cl::init(true), cl::Hidden);
+
ARM64Subtarget::ARM64Subtarget(const std::string &TT, const std::string &CPU,
const std::string &FS, bool LittleEndian)
: ARM64GenSubtargetInfo(TT, CPU, FS), ARMProcFamily(Others),
@@ -105,3 +109,7 @@ void ARM64Subtarget::overrideSchedPolicy(MachineSchedPolicy &Policy,
Policy.OnlyTopDown = false;
Policy.OnlyBottomUp = false;
}
+
+bool ARM64Subtarget::enableEarlyIfConversion() const override {
+ return EnableEarlyIfConvert;
+}
diff --git a/llvm/lib/Target/ARM64/ARM64Subtarget.h b/llvm/lib/Target/ARM64/ARM64Subtarget.h
index 88b9c2e7aa3..9cea3c387d6 100644
--- a/llvm/lib/Target/ARM64/ARM64Subtarget.h
+++ b/llvm/lib/Target/ARM64/ARM64Subtarget.h
@@ -102,6 +102,8 @@ public:
void overrideSchedPolicy(MachineSchedPolicy &Policy, MachineInstr *begin,
MachineInstr *end,
unsigned NumRegionInstrs) const override;
+
+ bool enableEarlyIfConversion() const override;
};
} // End llvm namespace
diff --git a/llvm/lib/Target/ARM64/ARM64TargetMachine.cpp b/llvm/lib/Target/ARM64/ARM64TargetMachine.cpp
index f5c187ceb27..5a8c5c6015d 100644
--- a/llvm/lib/Target/ARM64/ARM64TargetMachine.cpp
+++ b/llvm/lib/Target/ARM64/ARM64TargetMachine.cpp
@@ -25,10 +25,6 @@ EnableCCMP("arm64-ccmp", cl::desc("Enable the CCMP formation pass"),
cl::init(true), cl::Hidden);
static cl::opt<bool>
-EnableEarlyIfConvert("arm64-early-ifcvt", cl::desc("Enable the early if "
- "converter pass"), cl::init(true), cl::Hidden);
-
-static cl::opt<bool>
EnableStPairSuppress("arm64-stp-suppress", cl::desc("Suppress STP for ARM64"),
cl::init(true), cl::Hidden);
@@ -169,8 +165,7 @@ bool ARM64PassConfig::addInstSelector() {
bool ARM64PassConfig::addILPOpts() {
if (EnableCCMP)
addPass(createARM64ConditionalCompares());
- if (EnableEarlyIfConvert)
- addPass(&EarlyIfConverterID);
+ addPass(&EarlyIfConverterID);
if (EnableStPairSuppress)
addPass(createARM64StorePairSuppressPass());
return true;
OpenPOWER on IntegriCloud