aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86Subtarget.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-12-16 03:35:01 +0000
committerDan Gohman <gohman@apple.com>2008-12-16 03:35:01 +0000
commit8749b61178228ba1fb2668034d79da1b247173d7 (patch)
tree636b5ac610b13cb87c049c0be682018b5a610d2f /lib/Target/X86/X86Subtarget.cpp
parent9a65d6afc203fb8e44a807f84e3d370f16b08a5a (diff)
downloadexternal_llvm-8749b61178228ba1fb2668034d79da1b247173d7.zip
external_llvm-8749b61178228ba1fb2668034d79da1b247173d7.tar.gz
external_llvm-8749b61178228ba1fb2668034d79da1b247173d7.tar.bz2
Add initial support for back-scheduling address computations,
especially in the case of addresses computed from loop induction variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--lib/Target/X86/X86Subtarget.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index 2924d33..3c8f489 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -93,6 +93,17 @@ const char *X86Subtarget::getBZeroEntry() const {
return 0;
}
+/// getSpecialAddressLatency - For targets where it is beneficial to
+/// backschedule instructions that compute addresses, return a value
+/// indicating the number of scheduling cycles of backscheduling that
+/// should be attempted.
+unsigned X86Subtarget::getSpecialAddressLatency() const {
+ // For x86 out-of-order targets, back-schedule address computations so
+ // that loads and stores aren't blocked.
+ // This value was chosen arbitrarily.
+ return 200;
+}
+
/// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in the
/// specified arguments. If we can't run cpuid on the host, return true.
bool X86::GetCpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX,