forked from OSchip/llvm-project
Cleanup: Delete seemingly unused reference to MachineDominatorTree from ScheduleDAGInstrs.
llvm-svn: 216124
This commit is contained in:
parent
75172a9567
commit
ea0aee622e
|
@ -107,9 +107,7 @@ protected:
|
||||||
std::map<MachineInstr*, SUnit*> MIToSUnit;
|
std::map<MachineInstr*, SUnit*> MIToSUnit;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VLIWPacketizerList(
|
VLIWPacketizerList(MachineFunction &MF, MachineLoopInfo &MLI, bool IsPostRA);
|
||||||
MachineFunction &MF, MachineLoopInfo &MLI, MachineDominatorTree &MDT,
|
|
||||||
bool IsPostRA);
|
|
||||||
|
|
||||||
virtual ~VLIWPacketizerList();
|
virtual ~VLIWPacketizerList();
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
ScheduleDAGMI(MachineSchedContext *C, std::unique_ptr<MachineSchedStrategy> S,
|
ScheduleDAGMI(MachineSchedContext *C, std::unique_ptr<MachineSchedStrategy> S,
|
||||||
bool IsPostRA)
|
bool IsPostRA)
|
||||||
: ScheduleDAGInstrs(*C->MF, C->MLI, C->MDT, IsPostRA,
|
: ScheduleDAGInstrs(*C->MF, C->MLI, IsPostRA,
|
||||||
/*RemoveKillFlags=*/IsPostRA, C->LIS),
|
/*RemoveKillFlags=*/IsPostRA, C->LIS),
|
||||||
AA(C->AA), SchedImpl(std::move(S)), Topo(SUnits, &ExitSU), CurrentTop(),
|
AA(C->AA), SchedImpl(std::move(S)), Topo(SUnits, &ExitSU), CurrentTop(),
|
||||||
CurrentBottom(), NextClusterPred(nullptr), NextClusterSucc(nullptr) {
|
CurrentBottom(), NextClusterPred(nullptr), NextClusterSucc(nullptr) {
|
||||||
|
|
|
@ -76,7 +76,6 @@ namespace llvm {
|
||||||
class ScheduleDAGInstrs : public ScheduleDAG {
|
class ScheduleDAGInstrs : public ScheduleDAG {
|
||||||
protected:
|
protected:
|
||||||
const MachineLoopInfo *MLI;
|
const MachineLoopInfo *MLI;
|
||||||
const MachineDominatorTree *MDT;
|
|
||||||
const MachineFrameInfo *MFI;
|
const MachineFrameInfo *MFI;
|
||||||
|
|
||||||
/// Live Intervals provides reaching defs in preRA scheduling.
|
/// Live Intervals provides reaching defs in preRA scheduling.
|
||||||
|
@ -155,7 +154,6 @@ namespace llvm {
|
||||||
public:
|
public:
|
||||||
explicit ScheduleDAGInstrs(MachineFunction &mf,
|
explicit ScheduleDAGInstrs(MachineFunction &mf,
|
||||||
const MachineLoopInfo *mli,
|
const MachineLoopInfo *mli,
|
||||||
const MachineDominatorTree *mdt,
|
|
||||||
bool IsPostRAFlag,
|
bool IsPostRAFlag,
|
||||||
bool RemoveKillFlags = false,
|
bool RemoveKillFlags = false,
|
||||||
LiveIntervals *LIS = nullptr);
|
LiveIntervals *LIS = nullptr);
|
||||||
|
|
|
@ -106,16 +106,15 @@ namespace llvm {
|
||||||
class DefaultVLIWScheduler : public ScheduleDAGInstrs {
|
class DefaultVLIWScheduler : public ScheduleDAGInstrs {
|
||||||
public:
|
public:
|
||||||
DefaultVLIWScheduler(MachineFunction &MF, MachineLoopInfo &MLI,
|
DefaultVLIWScheduler(MachineFunction &MF, MachineLoopInfo &MLI,
|
||||||
MachineDominatorTree &MDT, bool IsPostRA);
|
bool IsPostRA);
|
||||||
// Schedule - Actual scheduling work.
|
// Schedule - Actual scheduling work.
|
||||||
void schedule() override;
|
void schedule() override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultVLIWScheduler::DefaultVLIWScheduler(
|
DefaultVLIWScheduler::DefaultVLIWScheduler(MachineFunction &MF,
|
||||||
MachineFunction &MF, MachineLoopInfo &MLI, MachineDominatorTree &MDT,
|
MachineLoopInfo &MLI, bool IsPostRA)
|
||||||
bool IsPostRA) :
|
: ScheduleDAGInstrs(MF, &MLI, IsPostRA) {
|
||||||
ScheduleDAGInstrs(MF, &MLI, &MDT, IsPostRA) {
|
|
||||||
CanHandleTerminators = true;
|
CanHandleTerminators = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,12 +124,12 @@ void DefaultVLIWScheduler::schedule() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// VLIWPacketizerList Ctor
|
// VLIWPacketizerList Ctor
|
||||||
VLIWPacketizerList::VLIWPacketizerList(
|
VLIWPacketizerList::VLIWPacketizerList(MachineFunction &MF,
|
||||||
MachineFunction &MF, MachineLoopInfo &MLI, MachineDominatorTree &MDT,
|
MachineLoopInfo &MLI, bool IsPostRA)
|
||||||
bool IsPostRA) : TM(MF.getTarget()), MF(MF) {
|
: TM(MF.getTarget()), MF(MF) {
|
||||||
TII = TM.getSubtargetImpl()->getInstrInfo();
|
TII = TM.getSubtargetImpl()->getInstrInfo();
|
||||||
ResourceTracker = TII->CreateTargetScheduleState(&TM, nullptr);
|
ResourceTracker = TII->CreateTargetScheduleState(&TM, nullptr);
|
||||||
VLIWScheduler = new DefaultVLIWScheduler(MF, MLI, MDT, IsPostRA);
|
VLIWScheduler = new DefaultVLIWScheduler(MF, MLI, IsPostRA);
|
||||||
}
|
}
|
||||||
|
|
||||||
// VLIWPacketizerList Dtor
|
// VLIWPacketizerList Dtor
|
||||||
|
|
|
@ -137,10 +137,10 @@ namespace {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SchedulePostRATDList(
|
SchedulePostRATDList(
|
||||||
MachineFunction &MF, MachineLoopInfo &MLI, MachineDominatorTree &MDT,
|
MachineFunction &MF, MachineLoopInfo &MLI, AliasAnalysis *AA,
|
||||||
AliasAnalysis *AA, const RegisterClassInfo&,
|
const RegisterClassInfo &,
|
||||||
TargetSubtargetInfo::AntiDepBreakMode AntiDepMode,
|
TargetSubtargetInfo::AntiDepBreakMode AntiDepMode,
|
||||||
SmallVectorImpl<const TargetRegisterClass*> &CriticalPathRCs);
|
SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs);
|
||||||
|
|
||||||
~SchedulePostRATDList();
|
~SchedulePostRATDList();
|
||||||
|
|
||||||
|
@ -193,11 +193,11 @@ INITIALIZE_PASS(PostRAScheduler, "post-RA-sched",
|
||||||
"Post RA top-down list latency scheduler", false, false)
|
"Post RA top-down list latency scheduler", false, false)
|
||||||
|
|
||||||
SchedulePostRATDList::SchedulePostRATDList(
|
SchedulePostRATDList::SchedulePostRATDList(
|
||||||
MachineFunction &MF, MachineLoopInfo &MLI, MachineDominatorTree &MDT,
|
MachineFunction &MF, MachineLoopInfo &MLI, AliasAnalysis *AA,
|
||||||
AliasAnalysis *AA, const RegisterClassInfo &RCI,
|
const RegisterClassInfo &RCI,
|
||||||
TargetSubtargetInfo::AntiDepBreakMode AntiDepMode,
|
TargetSubtargetInfo::AntiDepBreakMode AntiDepMode,
|
||||||
SmallVectorImpl<const TargetRegisterClass*> &CriticalPathRCs)
|
SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs)
|
||||||
: ScheduleDAGInstrs(MF, &MLI, &MDT, /*IsPostRA=*/true), AA(AA), EndIndex(0) {
|
: ScheduleDAGInstrs(MF, &MLI, /*IsPostRA=*/true), AA(AA), EndIndex(0) {
|
||||||
|
|
||||||
const TargetMachine &TM = MF.getTarget();
|
const TargetMachine &TM = MF.getTarget();
|
||||||
const InstrItineraryData *InstrItins =
|
const InstrItineraryData *InstrItins =
|
||||||
|
@ -269,7 +269,6 @@ bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
|
|
||||||
TII = Fn.getSubtarget().getInstrInfo();
|
TII = Fn.getSubtarget().getInstrInfo();
|
||||||
MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>();
|
MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>();
|
||||||
MachineDominatorTree &MDT = getAnalysis<MachineDominatorTree>();
|
|
||||||
AliasAnalysis *AA = &getAnalysis<AliasAnalysis>();
|
AliasAnalysis *AA = &getAnalysis<AliasAnalysis>();
|
||||||
TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>();
|
TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>();
|
||||||
|
|
||||||
|
@ -303,7 +302,7 @@ bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
|
|
||||||
DEBUG(dbgs() << "PostRAScheduler\n");
|
DEBUG(dbgs() << "PostRAScheduler\n");
|
||||||
|
|
||||||
SchedulePostRATDList Scheduler(Fn, MLI, MDT, AA, RegClassInfo, AntiDepMode,
|
SchedulePostRATDList Scheduler(Fn, MLI, AA, RegClassInfo, AntiDepMode,
|
||||||
CriticalPathRCs);
|
CriticalPathRCs);
|
||||||
|
|
||||||
// Loop over all of the basic blocks
|
// Loop over all of the basic blocks
|
||||||
|
|
|
@ -51,11 +51,10 @@ static cl::opt<bool> UseTBAA("use-tbaa-in-sched-mi", cl::Hidden,
|
||||||
|
|
||||||
ScheduleDAGInstrs::ScheduleDAGInstrs(MachineFunction &mf,
|
ScheduleDAGInstrs::ScheduleDAGInstrs(MachineFunction &mf,
|
||||||
const MachineLoopInfo *mli,
|
const MachineLoopInfo *mli,
|
||||||
const MachineDominatorTree *mdt,
|
|
||||||
bool IsPostRAFlag,
|
bool IsPostRAFlag,
|
||||||
bool RemoveKillFlags,
|
bool RemoveKillFlags,
|
||||||
LiveIntervals *lis)
|
LiveIntervals *lis)
|
||||||
: ScheduleDAG(mf), MLI(mli), MDT(mdt), MFI(mf.getFrameInfo()), LIS(lis),
|
: ScheduleDAG(mf), MLI(mli), MFI(mf.getFrameInfo()), LIS(lis),
|
||||||
IsPostRA(IsPostRAFlag), RemoveKillFlags(RemoveKillFlags),
|
IsPostRA(IsPostRAFlag), RemoveKillFlags(RemoveKillFlags),
|
||||||
CanHandleTerminators(false), FirstDbgValue(nullptr) {
|
CanHandleTerminators(false), FirstDbgValue(nullptr) {
|
||||||
assert((IsPostRA || LIS) && "PreRA scheduling requires LiveIntervals");
|
assert((IsPostRA || LIS) && "PreRA scheduling requires LiveIntervals");
|
||||||
|
|
|
@ -118,7 +118,6 @@ namespace {
|
||||||
public:
|
public:
|
||||||
// Ctor.
|
// Ctor.
|
||||||
HexagonPacketizerList(MachineFunction &MF, MachineLoopInfo &MLI,
|
HexagonPacketizerList(MachineFunction &MF, MachineLoopInfo &MLI,
|
||||||
MachineDominatorTree &MDT,
|
|
||||||
const MachineBranchProbabilityInfo *MBPI);
|
const MachineBranchProbabilityInfo *MBPI);
|
||||||
|
|
||||||
// initPacketizerState - initialize some internal flags.
|
// initPacketizerState - initialize some internal flags.
|
||||||
|
@ -184,20 +183,19 @@ INITIALIZE_PASS_END(HexagonPacketizer, "packets", "Hexagon Packetizer",
|
||||||
|
|
||||||
// HexagonPacketizerList Ctor.
|
// HexagonPacketizerList Ctor.
|
||||||
HexagonPacketizerList::HexagonPacketizerList(
|
HexagonPacketizerList::HexagonPacketizerList(
|
||||||
MachineFunction &MF, MachineLoopInfo &MLI,MachineDominatorTree &MDT,
|
MachineFunction &MF, MachineLoopInfo &MLI,
|
||||||
const MachineBranchProbabilityInfo *MBPI)
|
const MachineBranchProbabilityInfo *MBPI)
|
||||||
: VLIWPacketizerList(MF, MLI, MDT, true){
|
: VLIWPacketizerList(MF, MLI, true) {
|
||||||
this->MBPI = MBPI;
|
this->MBPI = MBPI;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HexagonPacketizer::runOnMachineFunction(MachineFunction &Fn) {
|
bool HexagonPacketizer::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
const TargetInstrInfo *TII = Fn.getSubtarget().getInstrInfo();
|
const TargetInstrInfo *TII = Fn.getSubtarget().getInstrInfo();
|
||||||
MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>();
|
MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>();
|
||||||
MachineDominatorTree &MDT = getAnalysis<MachineDominatorTree>();
|
|
||||||
const MachineBranchProbabilityInfo *MBPI =
|
const MachineBranchProbabilityInfo *MBPI =
|
||||||
&getAnalysis<MachineBranchProbabilityInfo>();
|
&getAnalysis<MachineBranchProbabilityInfo>();
|
||||||
// Instantiate the packetizer.
|
// Instantiate the packetizer.
|
||||||
HexagonPacketizerList Packetizer(Fn, MLI, MDT, MBPI);
|
HexagonPacketizerList Packetizer(Fn, MLI, MBPI);
|
||||||
|
|
||||||
// DFA state table should not be empty.
|
// DFA state table should not be empty.
|
||||||
assert(Packetizer.getResourceTracker() && "Empty DFA table!");
|
assert(Packetizer.getResourceTracker() && "Empty DFA table!");
|
||||||
|
|
|
@ -148,9 +148,8 @@ private:
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
// Ctor.
|
// Ctor.
|
||||||
R600PacketizerList(MachineFunction &MF, MachineLoopInfo &MLI,
|
R600PacketizerList(MachineFunction &MF, MachineLoopInfo &MLI)
|
||||||
MachineDominatorTree &MDT)
|
: VLIWPacketizerList(MF, MLI, true),
|
||||||
: VLIWPacketizerList(MF, MLI, MDT, true),
|
|
||||||
TII(static_cast<const R600InstrInfo *>(
|
TII(static_cast<const R600InstrInfo *>(
|
||||||
MF.getSubtarget().getInstrInfo())),
|
MF.getSubtarget().getInstrInfo())),
|
||||||
TRI(TII->getRegisterInfo()) {
|
TRI(TII->getRegisterInfo()) {
|
||||||
|
@ -331,10 +330,9 @@ public:
|
||||||
bool R600Packetizer::runOnMachineFunction(MachineFunction &Fn) {
|
bool R600Packetizer::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
const TargetInstrInfo *TII = Fn.getSubtarget().getInstrInfo();
|
const TargetInstrInfo *TII = Fn.getSubtarget().getInstrInfo();
|
||||||
MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>();
|
MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>();
|
||||||
MachineDominatorTree &MDT = getAnalysis<MachineDominatorTree>();
|
|
||||||
|
|
||||||
// Instantiate the packetizer.
|
// Instantiate the packetizer.
|
||||||
R600PacketizerList Packetizer(Fn, MLI, MDT);
|
R600PacketizerList Packetizer(Fn, MLI);
|
||||||
|
|
||||||
// DFA state table should not be empty.
|
// DFA state table should not be empty.
|
||||||
assert(Packetizer.getResourceTracker() && "Empty DFA table!");
|
assert(Packetizer.getResourceTracker() && "Empty DFA table!");
|
||||||
|
|
Loading…
Reference in New Issue