Remove unused class variables and update all callers/uses from
the HexagonSplitTFRCondSet pass. Use the subtarget off the machine function at the same time. llvm-svn: 227878
This commit is contained in:
parent
d45837155d
commit
6098f150a1
|
@ -36,7 +36,7 @@ namespace llvm {
|
|||
FunctionPass *createHexagonRemoveExtendArgs(const HexagonTargetMachine &TM);
|
||||
FunctionPass *createHexagonCFGOptimizer();
|
||||
|
||||
FunctionPass *createHexagonSplitTFRCondSets(const HexagonTargetMachine &TM);
|
||||
FunctionPass *createHexagonSplitTFRCondSets();
|
||||
FunctionPass *createHexagonSplitConst32AndConst64();
|
||||
FunctionPass *createHexagonExpandPredSpillCode();
|
||||
FunctionPass *createHexagonHardwareLoops();
|
||||
|
|
|
@ -58,13 +58,9 @@ namespace llvm {
|
|||
namespace {
|
||||
|
||||
class HexagonSplitTFRCondSets : public MachineFunctionPass {
|
||||
const HexagonTargetMachine &QTM;
|
||||
const HexagonSubtarget &QST;
|
||||
|
||||
public:
|
||||
static char ID;
|
||||
HexagonSplitTFRCondSets(const HexagonTargetMachine& TM) :
|
||||
MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {
|
||||
HexagonSplitTFRCondSets() : MachineFunctionPass(ID) {
|
||||
initializeHexagonSplitTFRCondSetsPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
|
@ -80,7 +76,7 @@ char HexagonSplitTFRCondSets::ID = 0;
|
|||
|
||||
bool HexagonSplitTFRCondSets::runOnMachineFunction(MachineFunction &Fn) {
|
||||
|
||||
const TargetInstrInfo *TII = QTM.getSubtargetImpl()->getInstrInfo();
|
||||
const TargetInstrInfo *TII = Fn.getSubtarget().getInstrInfo();
|
||||
|
||||
// Loop over all of the basic blocks.
|
||||
for (MachineFunction::iterator MBBb = Fn.begin(), MBBe = Fn.end();
|
||||
|
@ -171,7 +167,6 @@ void llvm::initializeHexagonSplitTFRCondSetsPass(PassRegistry &Registry) {
|
|||
CALL_ONCE_INITIALIZATION(initializePassOnce)
|
||||
}
|
||||
|
||||
FunctionPass*
|
||||
llvm::createHexagonSplitTFRCondSets(const HexagonTargetMachine &TM) {
|
||||
return new HexagonSplitTFRCondSets(TM);
|
||||
FunctionPass *llvm::createHexagonSplitTFRCondSets() {
|
||||
return new HexagonSplitTFRCondSets();
|
||||
}
|
||||
|
|
|
@ -151,7 +151,6 @@ void HexagonPassConfig::addPreSched2() {
|
|||
}
|
||||
|
||||
void HexagonPassConfig::addPreEmitPass() {
|
||||
const HexagonTargetMachine &TM = getHexagonTargetMachine();
|
||||
bool NoOpt = (getOptLevel() == CodeGenOpt::None);
|
||||
|
||||
if (!NoOpt)
|
||||
|
@ -161,7 +160,7 @@ void HexagonPassConfig::addPreEmitPass() {
|
|||
addPass(createHexagonExpandPredSpillCode(), false);
|
||||
|
||||
// Split up TFRcondsets into conditional transfers.
|
||||
addPass(createHexagonSplitTFRCondSets(TM), false);
|
||||
addPass(createHexagonSplitTFRCondSets(), false);
|
||||
|
||||
// Create Packets.
|
||||
if (!NoOpt) {
|
||||
|
|
Loading…
Reference in New Issue