mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-27 14:45:50 +00:00
Remove getTargetLowering from TargetPassConfig as the target lowering
can change depending upon subtarget/subtarget features for a function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9bfc3f592d
commit
5fe59a2e10
@ -133,10 +133,6 @@ public:
|
||||
return *static_cast<TMC*>(TM);
|
||||
}
|
||||
|
||||
const TargetLowering *getTargetLowering() const {
|
||||
return TM->getTargetLowering();
|
||||
}
|
||||
|
||||
//
|
||||
void setInitialized() { Initialized = true; }
|
||||
|
||||
|
@ -17,9 +17,10 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "HexagonTargetMachine.h"
|
||||
#include "HexagonMachineFunctionInfo.h"
|
||||
#include "HexagonSubtarget.h"
|
||||
#include "HexagonTargetMachine.h"
|
||||
#include "HexagonTargetObjectFile.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/CodeGen/LatencyPriorityQueue.h"
|
||||
#include "llvm/CodeGen/MachineDominators.h"
|
||||
@ -66,6 +67,12 @@ char HexagonSplitConst32AndConst64::ID = 0;
|
||||
|
||||
bool HexagonSplitConst32AndConst64::runOnMachineFunction(MachineFunction &Fn) {
|
||||
|
||||
const HexagonTargetObjectFile &TLOF =
|
||||
(const HexagonTargetObjectFile &)
|
||||
QTM.getTargetLowering()->getObjFileLowering();
|
||||
if (TLOF.IsSmallDataEnabled())
|
||||
return true;
|
||||
|
||||
const TargetInstrInfo *TII = QTM.getInstrInfo();
|
||||
|
||||
// Loop over all of the basic blocks
|
||||
|
@ -150,16 +150,12 @@ bool HexagonPassConfig::addPostRegAlloc() {
|
||||
|
||||
bool HexagonPassConfig::addPreSched2() {
|
||||
const HexagonTargetMachine &TM = getHexagonTargetMachine();
|
||||
const HexagonTargetObjectFile &TLOF =
|
||||
(const HexagonTargetObjectFile &)getTargetLowering()->getObjFileLowering();
|
||||
|
||||
addPass(createHexagonCopyToCombine());
|
||||
if (getOptLevel() != CodeGenOpt::None)
|
||||
addPass(&IfConverterID);
|
||||
if (!TLOF.IsSmallDataEnabled()) {
|
||||
addPass(createHexagonSplitConst32AndConst64(TM));
|
||||
printAndVerify("After hexagon split const32/64 pass");
|
||||
}
|
||||
addPass(createHexagonSplitConst32AndConst64(TM));
|
||||
printAndVerify("After hexagon split const32/64 pass");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user