aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-16 21:06:15 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-16 21:06:15 +0000
commit86e24b01e3cfdd1d2f533df99be1824515b677c5 (patch)
tree51f5245dad4140831499d493abbec59c6b823ee4 /lib/Target
parent5e1dcfc3d1327614ac50f7f6ad8e298a3b90f927 (diff)
downloadexternal_llvm-86e24b01e3cfdd1d2f533df99be1824515b677c5.zip
external_llvm-86e24b01e3cfdd1d2f533df99be1824515b677c5.tar.gz
external_llvm-86e24b01e3cfdd1d2f533df99be1824515b677c5.tar.bz2
Change createPostRAScheduler so it can be turned off at llc -O1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/ARM/ARMSubtarget.h8
-rw-r--r--lib/Target/X86/X86Subtarget.h7
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h
index 7098fd4..bc5768e 100644
--- a/lib/Target/ARM/ARMSubtarget.h
+++ b/lib/Target/ARM/ARMSubtarget.h
@@ -126,9 +126,11 @@ protected:
const std::string & getCPUString() const { return CPUString; }
- /// enablePostRAScheduler - From TargetSubtarget, return true to
- /// enable post-RA scheduler.
- bool enablePostRAScheduler() const { return PostRAScheduler; }
+ /// enablePostRAScheduler - True at 'More' optimization except
+ /// for Thumb1.
+ bool enablePostRAScheduler(CodeGenOpt::Level OptLevel) const {
+ return PostRAScheduler && OptLevel >= CodeGenOpt::Default;
+ }
/// getInstrItins - Return the instruction itineraies based on subtarget
/// selection.
diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h
index cb14e3c..16a2f10 100644
--- a/lib/Target/X86/X86Subtarget.h
+++ b/lib/Target/X86/X86Subtarget.h
@@ -215,6 +215,13 @@ public:
/// indicating the number of scheduling cycles of backscheduling that
/// should be attempted.
unsigned getSpecialAddressLatency() const;
+
+ /// enablePostRAScheduler - X86 target is enabling post-alloc scheduling
+ /// at 'More' optimization level.
+ bool enablePostRAScheduler(CodeGenOpt::Level OptLevel) const {
+ // FIXME: This causes llvm to miscompile itself on i386. :-(
+ return false/*OptLevel >= CodeGenOpt::Default*/;
+ }
};
} // End llvm namespace