[llvm] r210386 - Replace the use of TargetMachine with a tiny bool variable.
Eric Christopher
echristo at gmail.com
Fri Jun 6 16:26:49 PDT 2014
Author: echristo
Date: Fri Jun 6 18:26:48 2014
New Revision: 210386
URL: http://llvm.org/viewvc/llvm-project?rev=210386&view=rev
Log:
Replace the use of TargetMachine with a tiny bool variable.
Modified:
llvm/trunk/lib/Target/X86/X86JITInfo.cpp
llvm/trunk/lib/Target/X86/X86JITInfo.h
llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
Modified: llvm/trunk/lib/Target/X86/X86JITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86JITInfo.cpp?rev=210386&r1=210385&r2=210386&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86JITInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86JITInfo.cpp Fri Jun 6 18:26:48 2014
@@ -432,7 +432,7 @@ X86JITInfo::getLazyResolverFunction(JITC
// 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(JITC
return X86CompilationCallback;
}
-X86JITInfo::X86JITInfo(X86TargetMachine &tm) : TM(tm) {
- Subtarget = &TM.getSubtarget<X86Subtarget>();
+X86JITInfo::X86JITInfo(bool UseSSE) {
+ useSSE = UseSSE;
useGOT = 0;
TLSOffset = nullptr;
}
Modified: llvm/trunk/lib/Target/X86/X86JITInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86JITInfo.h?rev=210386&r1=210385&r2=210386&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86JITInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86JITInfo.h Fri Jun 6 18:26:48 2014
@@ -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
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=210386&r1=210385&r2=210386&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Fri Jun 6 18:26:48 2014
@@ -80,7 +80,7 @@ X86TargetMachine::X86TargetMachine(const
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.
More information about the llvm-commits
mailing list