mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Replace the use of TargetMachine with a tiny bool variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df2f80d909
commit
7fe88820e3
@ -432,7 +432,7 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
|
|||||||
// SSE Callback should be called for SSE-enabled LLVM.
|
// SSE Callback should be called for SSE-enabled LLVM.
|
||||||
return X86CompilationCallback_SSE;
|
return X86CompilationCallback_SSE;
|
||||||
#else
|
#else
|
||||||
if (Subtarget->hasSSE1())
|
if (useSSE)
|
||||||
return X86CompilationCallback_SSE;
|
return X86CompilationCallback_SSE;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -440,8 +440,8 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
|
|||||||
return X86CompilationCallback;
|
return X86CompilationCallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
X86JITInfo::X86JITInfo(X86TargetMachine &tm) : TM(tm) {
|
X86JITInfo::X86JITInfo(bool UseSSE) {
|
||||||
Subtarget = &TM.getSubtarget<X86Subtarget>();
|
useSSE = UseSSE;
|
||||||
useGOT = 0;
|
useGOT = 0;
|
||||||
TLSOffset = nullptr;
|
TLSOffset = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -19,16 +19,14 @@
|
|||||||
#include "llvm/Target/TargetJITInfo.h"
|
#include "llvm/Target/TargetJITInfo.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class X86TargetMachine;
|
|
||||||
class X86Subtarget;
|
class X86Subtarget;
|
||||||
|
|
||||||
class X86JITInfo : public TargetJITInfo {
|
class X86JITInfo : public TargetJITInfo {
|
||||||
X86TargetMachine &TM;
|
|
||||||
const X86Subtarget *Subtarget;
|
|
||||||
uintptr_t PICBase;
|
uintptr_t PICBase;
|
||||||
char* TLSOffset;
|
char* TLSOffset;
|
||||||
|
bool useSSE;
|
||||||
public:
|
public:
|
||||||
explicit X86JITInfo(X86TargetMachine &tm);
|
explicit X86JITInfo(bool UseSSE);
|
||||||
|
|
||||||
/// replaceMachineCodeForFunction - Make it so that calling the function
|
/// replaceMachineCodeForFunction - Make it so that calling the function
|
||||||
/// whose machine code is at OLD turns into a call to NEW, perhaps by
|
/// whose machine code is at OLD turns into a call to NEW, perhaps by
|
||||||
|
@ -80,7 +80,7 @@ X86TargetMachine::X86TargetMachine(const Target &T, StringRef TT, StringRef CPU,
|
|||||||
Subtarget.getStackAlignment(),
|
Subtarget.getStackAlignment(),
|
||||||
Subtarget.is64Bit() ? -8 : -4),
|
Subtarget.is64Bit() ? -8 : -4),
|
||||||
DL(computeDataLayout(*getSubtargetImpl())), InstrInfo(*this),
|
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.
|
// Determine the PICStyle based on the target selected.
|
||||||
if (getRelocationModel() == Reloc::Static) {
|
if (getRelocationModel() == Reloc::Static) {
|
||||||
// Unless we're in PIC or DynamicNoPIC mode, set the PIC style to None.
|
// Unless we're in PIC or DynamicNoPIC mode, set the PIC style to None.
|
||||||
|
Loading…
Reference in New Issue
Block a user