summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
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/PowerPC
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/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCSubtarget.h2
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h
index 76f4a318e82..ee43fd5f807 100644
--- a/llvm/lib/Target/PowerPC/PPCSubtarget.h
+++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h
@@ -205,6 +205,8 @@ public:
TargetSubtargetInfo::AntiDepBreakMode& Mode,
RegClassVector& CriticalPathRCs) const override;
+ bool enableEarlyIfConversion() const override { return hasISEL(); }
+
// Scheduling customization.
bool enableMachineScheduler() const override;
void overrideSchedPolicy(MachineSchedPolicy &Policy,
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index fdfb8c9bfc9..e9c7797b504 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -148,12 +148,8 @@ bool PPCPassConfig::addPreISel() {
}
bool PPCPassConfig::addILPOpts() {
- if (getPPCSubtarget().hasISEL()) {
- addPass(&EarlyIfConverterID);
- return true;
- }
-
- return false;
+ addPass(&EarlyIfConverterID);
+ return true;
}
bool PPCPassConfig::addInstSelector() {
OpenPOWER on IntegriCloud