diff options
author | Dan Gohman <gohman@apple.com> | 2008-12-16 03:35:01 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-12-16 03:35:01 +0000 |
commit | b9a012156bbf3b13eb16027c0a75c186f172366a (patch) | |
tree | ddca9ea721a90c50826d431f6a6e34c398c5d834 /llvm/lib/Target/X86/X86Subtarget.cpp | |
parent | 405f2197a47e6e6fb1104485b35a7a1fcbd35367 (diff) | |
download | bcm5719-llvm-b9a012156bbf3b13eb16027c0a75c186f172366a.tar.gz bcm5719-llvm-b9a012156bbf3b13eb16027c0a75c186f172366a.zip |
Add initial support for back-scheduling address computations,
especially in the case of addresses computed from loop induction
variables.
llvm-svn: 61075
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp index 2924d33a3b7..3c8f489c372 100644 --- a/llvm/lib/Target/X86/X86Subtarget.cpp +++ b/llvm/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, |