summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86Subtarget.h
diff options
context:
space:
mode:
authorPreston Gurd <preston.gurd@intel.com>2013-03-27 19:14:02 +0000
committerPreston Gurd <preston.gurd@intel.com>2013-03-27 19:14:02 +0000
commit1edadea42f6f5c393b4fdb9d7ce1cf7eb9c24ab4 (patch)
tree0703e20d41246fa36a72779d0d1ba5b58b6ee2d7 /lib/Target/X86/X86Subtarget.h
parente915047fed99221afb8c540d8a7e81038a6483f1 (diff)
downloadllvm-1edadea42f6f5c393b4fdb9d7ce1cf7eb9c24ab4.tar.gz
llvm-1edadea42f6f5c393b4fdb9d7ce1cf7eb9c24ab4.tar.bz2
llvm-1edadea42f6f5c393b4fdb9d7ce1cf7eb9c24ab4.tar.xz
For the current Atom processor, the fastest way to handle a call
indirect through a memory address is to load the memory address into a register and then call indirect through the register. This patch implements this improvement by modifying SelectionDAG to force a function address which is a memory reference to be loaded into a virtual register. Patch by Sriram Murali. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.h')
-rw-r--r--lib/Target/X86/X86Subtarget.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h
index 108ef0eb1c..cac3f579b0 100644
--- a/lib/Target/X86/X86Subtarget.h
+++ b/lib/Target/X86/X86Subtarget.h
@@ -159,6 +159,10 @@ protected:
/// a stall when returning too early.
bool PadShortFunctions;
+ /// CallRegIndirect - True if the Calls with memory reference should be converted
+ /// to a register-based indirect call.
+ bool CallRegIndirect;
+
/// stackAlignment - The minimum alignment known to hold of the stack frame on
/// entry to the function and which must be maintained by every function.
unsigned stackAlignment;
@@ -269,6 +273,7 @@ public:
bool useLeaForSP() const { return UseLeaForSP; }
bool hasSlowDivide() const { return HasSlowDivide; }
bool padShortFunctions() const { return PadShortFunctions; }
+ bool callRegIndirect() const { return CallRegIndirect; }
bool isAtom() const { return X86ProcFamily == IntelAtom; }