summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86Subtarget.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-10 05:45:15 +0000
committerChris Lattner <sabre@nondot.org>2009-07-10 05:45:15 +0000
commit7277a807f08f6c447bad1b04f251b3674401350f (patch)
tree511225cd4cb9a8d9acf873573474292f8503bef4 /llvm/lib/Target/X86/X86Subtarget.h
parent1cc7ae7c3b79bae91d8749901f4e1dd498761eaa (diff)
downloadbcm5719-llvm-7277a807f08f6c447bad1b04f251b3674401350f.tar.gz
bcm5719-llvm-7277a807f08f6c447bad1b04f251b3674401350f.zip
There is only one case where GVRequiresExtraLoad returns true for calls:
split its handling out to PCRelGVRequiresExtraLoad, and simplify code based on this. llvm-svn: 75230
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h
index db3b5d5eaf9..b2e518ed39f 100644
--- a/llvm/lib/Target/X86/X86Subtarget.h
+++ b/llvm/lib/Target/X86/X86Subtarget.h
@@ -204,10 +204,16 @@ public:
bool GVRequiresExtraLoad(const GlobalValue* GV, const TargetMachine &TM,
bool isDirectCall) const;
+ /// PCRelGVRequiresExtraLoad - True if accessing the GV from a PC-relative
+ /// operand like a call target requires an extra load.
+ bool PCRelGVRequiresExtraLoad(const GlobalValue *GV,
+ const TargetMachine &TM) const;
+
+
/// True if accessing the GV requires a register. This is a superset of the
/// cases where GVRequiresExtraLoad is true. Some variations of PIC require
/// a register, but not an extra load.
- bool GVRequiresRegister(const GlobalValue* GV, const TargetMachine &TM) const;
+ bool GVRequiresRegister(const GlobalValue *GV, const TargetMachine &TM) const;
/// IsLegalToCallImmediateAddr - Return true if the subtarget allows calls
/// to immediate address.
OpenPOWER on IntegriCloud