summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-06-06 23:26:48 +0000
committerEric Christopher <echristo@gmail.com>2014-06-06 23:26:48 +0000
commit28783da0443a33cd624713ecb1be78ac54a63e7b (patch)
tree1dc2365c38c38f319b3345227f3e1de0eb7af1b1 /llvm/lib
parente5add682cefcb1ffd55838886626bbb13646173a (diff)
downloadbcm5719-llvm-28783da0443a33cd624713ecb1be78ac54a63e7b.tar.gz
bcm5719-llvm-28783da0443a33cd624713ecb1be78ac54a63e7b.zip
Replace the use of TargetMachine with a tiny bool variable.
llvm-svn: 210386
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86JITInfo.cpp6
-rw-r--r--llvm/lib/Target/X86/X86JITInfo.h6
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp2
3 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/Target/X86/X86JITInfo.cpp b/llvm/lib/Target/X86/X86JITInfo.cpp
index e969ef2cf3d..a082c4f8b0e 100644
--- a/llvm/lib/Target/X86/X86JITInfo.cpp
+++ b/llvm/lib/Target/X86/X86JITInfo.cpp
@@ -432,7 +432,7 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
// SSE Callback should be called for SSE-enabled LLVM.
return X86CompilationCallback_SSE;
#else
- if (Subtarget->hasSSE1())
+ if (useSSE)
return X86CompilationCallback_SSE;
#endif
#endif
@@ -440,8 +440,8 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
return X86CompilationCallback;
}
-X86JITInfo::X86JITInfo(X86TargetMachine &tm) : TM(tm) {
- Subtarget = &TM.getSubtarget<X86Subtarget>();
+X86JITInfo::X86JITInfo(bool UseSSE) {
+ useSSE = UseSSE;
useGOT = 0;
TLSOffset = nullptr;
}
diff --git a/llvm/lib/Target/X86/X86JITInfo.h b/llvm/lib/Target/X86/X86JITInfo.h
index 4d279de3425..f9122697b74 100644
--- a/llvm/lib/Target/X86/X86JITInfo.h
+++ b/llvm/lib/Target/X86/X86JITInfo.h
@@ -19,16 +19,14 @@
#include "llvm/Target/TargetJITInfo.h"
namespace llvm {
- class X86TargetMachine;
class X86Subtarget;
class X86JITInfo : public TargetJITInfo {
- X86TargetMachine &TM;
- const X86Subtarget *Subtarget;
uintptr_t PICBase;
char* TLSOffset;
+ bool useSSE;
public:
- explicit X86JITInfo(X86TargetMachine &tm);
+ explicit X86JITInfo(bool UseSSE);
/// replaceMachineCodeForFunction - Make it so that calling the function
/// whose machine code is at OLD turns into a call to NEW, perhaps by
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 83b304184f8..59b8cba3139 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -80,7 +80,7 @@ X86TargetMachine::X86TargetMachine(const Target &T, StringRef TT, StringRef CPU,
Subtarget.getStackAlignment(),
Subtarget.is64Bit() ? -8 : -4),
DL(computeDataLayout(*getSubtargetImpl())), InstrInfo(*this),
- TLInfo(*this), TSInfo(DL), JITInfo(*this) {
+ TLInfo(*this), TSInfo(DL), JITInfo(Subtarget.hasSSE1()) {
// Determine the PICStyle based on the target selected.
if (getRelocationModel() == Reloc::Static) {
// Unless we're in PIC or DynamicNoPIC mode, set the PIC style to None.
OpenPOWER on IntegriCloud