mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-16 00:33:10 +00:00
Remove the use of getSubtarget in the creation of the X86
PassManager instance. In one case we can make the determination from the Triple, in the other (execution dependency pass) the pass will avoid running if we don't have any code that uses that register class so go ahead and add it to the pipeline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228334 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3e68370c22
commit
a4ed04095c
@ -186,10 +186,6 @@ public:
|
||||
return getTM<X86TargetMachine>();
|
||||
}
|
||||
|
||||
const X86Subtarget &getX86Subtarget() const {
|
||||
return *getX86TargetMachine().getSubtargetImpl();
|
||||
}
|
||||
|
||||
void addIRPasses() override;
|
||||
bool addInstSelector() override;
|
||||
bool addILPOpts() override;
|
||||
@ -214,7 +210,8 @@ bool X86PassConfig::addInstSelector() {
|
||||
addPass(createX86ISelDag(getX86TargetMachine(), getOptLevel()));
|
||||
|
||||
// For ELF, cleanup any local-dynamic TLS accesses.
|
||||
if (getX86Subtarget().isTargetELF() && getOptLevel() != CodeGenOpt::None)
|
||||
if (Triple(TM->getTargetTriple()).isOSBinFormatELF() &&
|
||||
getOptLevel() != CodeGenOpt::None)
|
||||
addPass(createCleanupLocalDynamicTLSPass());
|
||||
|
||||
addPass(createX86GlobalBaseRegPass());
|
||||
@ -236,7 +233,7 @@ void X86PassConfig::addPostRegAlloc() {
|
||||
}
|
||||
|
||||
void X86PassConfig::addPreEmitPass() {
|
||||
if (getOptLevel() != CodeGenOpt::None && getX86Subtarget().hasSSE2())
|
||||
if (getOptLevel() != CodeGenOpt::None)
|
||||
addPass(createExecutionDependencyFixPass(&X86::VR128RegClass));
|
||||
|
||||
if (UseVZeroUpper)
|
||||
|
Loading…
x
Reference in New Issue
Block a user