mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-27 12:26:08 +00:00
Change MCSchedModel to be a struct of statically initialized data.
This removes static initializers from the backends which generate this data, and also makes this struct match the other Tablegen generated structs in behaviour Reviewed by Andy Trick and Chandler C git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,7 +38,7 @@ namespace {
|
||||
class MachineCombiner : public MachineFunctionPass {
|
||||
const TargetInstrInfo *TII;
|
||||
const TargetRegisterInfo *TRI;
|
||||
const MCSchedModel *SchedModel;
|
||||
MCSchedModel SchedModel;
|
||||
MachineRegisterInfo *MRI;
|
||||
MachineTraceMetrics *Traces;
|
||||
MachineTraceMetrics::Ensemble *MinInstr;
|
||||
@@ -260,7 +260,7 @@ void MachineCombiner::instr2instrSC(
|
||||
for (auto *InstrPtr : Instrs) {
|
||||
unsigned Opc = InstrPtr->getOpcode();
|
||||
unsigned Idx = TII->get(Opc).getSchedClass();
|
||||
const MCSchedClassDesc *SC = SchedModel->getSchedClassDesc(Idx);
|
||||
const MCSchedClassDesc *SC = SchedModel.getSchedClassDesc(Idx);
|
||||
InstrsSC.push_back(SC);
|
||||
}
|
||||
}
|
||||
@@ -411,7 +411,7 @@ bool MachineCombiner::runOnMachineFunction(MachineFunction &MF) {
|
||||
TII = STI.getInstrInfo();
|
||||
TRI = STI.getRegisterInfo();
|
||||
SchedModel = STI.getSchedModel();
|
||||
TSchedModel.init(*SchedModel, &STI, TII);
|
||||
TSchedModel.init(SchedModel, &STI, TII);
|
||||
MRI = &MF.getRegInfo();
|
||||
Traces = &getAnalysis<MachineTraceMetrics>();
|
||||
MinInstr = 0;
|
||||
|
Reference in New Issue
Block a user