diff options
author | Chris Lattner <sabre@nondot.org> | 2006-12-11 23:22:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-12-11 23:22:45 +0000 |
commit | f4646a7e544f61c03c8f4771780b28bd7cc498b8 (patch) | |
tree | 86ef066a43ffcd9caff6564e07076d8df3a54233 /llvm/lib/Target/PowerPC/PPCSubtarget.h | |
parent | 2d73fe7fadc17c763988953a7a952cc344452509 (diff) | |
download | bcm5719-llvm-f4646a7e544f61c03c8f4771780b28bd7cc498b8.tar.gz bcm5719-llvm-f4646a7e544f61c03c8f4771780b28bd7cc498b8.zip |
Another step forward in PPC64 JIT support: we now no-longer need stubs
emitted for external globals in PPC64-JIT-PIC mode (which is good because
we didn't handle them before!).
This also fixes a bug handling the picbase delta, which we would get wrong
in some cases.
llvm-svn: 32451
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCSubtarget.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h index 1cce24d2f66..e8ad25f3eba 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.h +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h @@ -21,9 +21,13 @@ namespace llvm { class Module; - +class GlobalValue; +class TargetMachine; + class PPCSubtarget : public TargetSubtarget { protected: + const TargetMachine &TM; + /// 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; @@ -40,15 +44,21 @@ protected: bool HasFSQRT; bool HasSTFIWX; bool IsDarwin; + bool HasLazyResolverStubs; public: /// This constructor initializes the data members to match that /// of the specified module. /// - PPCSubtarget(const Module &M, const std::string &FS, bool is64Bit); + PPCSubtarget(const TargetMachine &TM, const Module &M, + const std::string &FS, bool is64Bit); /// ParseSubtargetFeatures - Parses features string setting specified /// subtarget options. Definition of function is auto generated by tblgen. void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU); + + /// SetJITMode - This is called to inform the subtarget info that we are + /// producing code for the JIT. + void SetJITMode(); /// getStackAlignment - Returns the minimum alignment known to hold of the /// stack frame on entry to the function and which must be maintained by every @@ -78,6 +88,10 @@ public: /// has64BitSupport() returns true. bool use64BitRegs() const { return Use64BitRegs; } + /// hasLazyResolverStub - Return true if accesses to the specified global have + /// to go through a dyld lazy resolution stub. This means that an extra load + /// is required to get the address of the global. + bool hasLazyResolverStub(const GlobalValue *GV) const; // Specific obvious features. bool hasFSQRT() const { return HasFSQRT; } |