mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-30 22:18:46 +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:
@@ -133,10 +133,6 @@ public:
|
|||||||
return *static_cast<TMC*>(TM);
|
return *static_cast<TMC*>(TM);
|
||||||
}
|
}
|
||||||
|
|
||||||
const TargetLowering *getTargetLowering() const {
|
|
||||||
return TM->getTargetLowering();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
void setInitialized() { Initialized = true; }
|
void setInitialized() { Initialized = true; }
|
||||||
|
|
||||||
|
@@ -17,9 +17,10 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "HexagonTargetMachine.h"
|
|
||||||
#include "HexagonMachineFunctionInfo.h"
|
#include "HexagonMachineFunctionInfo.h"
|
||||||
#include "HexagonSubtarget.h"
|
#include "HexagonSubtarget.h"
|
||||||
|
#include "HexagonTargetMachine.h"
|
||||||
|
#include "HexagonTargetObjectFile.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/CodeGen/LatencyPriorityQueue.h"
|
#include "llvm/CodeGen/LatencyPriorityQueue.h"
|
||||||
#include "llvm/CodeGen/MachineDominators.h"
|
#include "llvm/CodeGen/MachineDominators.h"
|
||||||
@@ -66,6 +67,12 @@ char HexagonSplitConst32AndConst64::ID = 0;
|
|||||||
|
|
||||||
bool HexagonSplitConst32AndConst64::runOnMachineFunction(MachineFunction &Fn) {
|
bool HexagonSplitConst32AndConst64::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
|
|
||||||
|
const HexagonTargetObjectFile &TLOF =
|
||||||
|
(const HexagonTargetObjectFile &)
|
||||||
|
QTM.getTargetLowering()->getObjFileLowering();
|
||||||
|
if (TLOF.IsSmallDataEnabled())
|
||||||
|
return true;
|
||||||
|
|
||||||
const TargetInstrInfo *TII = QTM.getInstrInfo();
|
const TargetInstrInfo *TII = QTM.getInstrInfo();
|
||||||
|
|
||||||
// Loop over all of the basic blocks
|
// Loop over all of the basic blocks
|
||||||
|
@@ -150,16 +150,12 @@ bool HexagonPassConfig::addPostRegAlloc() {
|
|||||||
|
|
||||||
bool HexagonPassConfig::addPreSched2() {
|
bool HexagonPassConfig::addPreSched2() {
|
||||||
const HexagonTargetMachine &TM = getHexagonTargetMachine();
|
const HexagonTargetMachine &TM = getHexagonTargetMachine();
|
||||||
const HexagonTargetObjectFile &TLOF =
|
|
||||||
(const HexagonTargetObjectFile &)getTargetLowering()->getObjFileLowering();
|
|
||||||
|
|
||||||
addPass(createHexagonCopyToCombine());
|
addPass(createHexagonCopyToCombine());
|
||||||
if (getOptLevel() != CodeGenOpt::None)
|
if (getOptLevel() != CodeGenOpt::None)
|
||||||
addPass(&IfConverterID);
|
addPass(&IfConverterID);
|
||||||
if (!TLOF.IsSmallDataEnabled()) {
|
addPass(createHexagonSplitConst32AndConst64(TM));
|
||||||
addPass(createHexagonSplitConst32AndConst64(TM));
|
printAndVerify("After hexagon split const32/64 pass");
|
||||||
printAndVerify("After hexagon split const32/64 pass");
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user