protected:
MachineFunction &MF;
const TargetInstrInfo *TII;
+ AliasAnalysis *AA;
// The VLIW Scheduler.
DefaultVLIWScheduler *VLIWScheduler;
std::map<MachineInstr*, SUnit*> MIToSUnit;
public:
- VLIWPacketizerList(MachineFunction &MF, MachineLoopInfo &MLI);
+ // The AliasAnalysis parameter can be nullptr.
+ VLIWPacketizerList(MachineFunction &MF, MachineLoopInfo &MLI,
+ AliasAnalysis *AA);
virtual ~VLIWPacketizerList();
// DefaultVLIWScheduler - This class extends ScheduleDAGInstrs and overrides
// Schedule method to build the dependence graph.
class DefaultVLIWScheduler : public ScheduleDAGInstrs {
+private:
+ AliasAnalysis *AA;
public:
- DefaultVLIWScheduler(MachineFunction &MF, MachineLoopInfo &MLI);
+ DefaultVLIWScheduler(MachineFunction &MF, MachineLoopInfo &MLI,
+ AliasAnalysis *AA);
// Schedule - Actual scheduling work.
void schedule() override;
};
}
DefaultVLIWScheduler::DefaultVLIWScheduler(MachineFunction &MF,
- MachineLoopInfo &MLI)
- : ScheduleDAGInstrs(MF, &MLI) {
+ MachineLoopInfo &MLI,
+ AliasAnalysis *AA)
+ : ScheduleDAGInstrs(MF, &MLI), AA(AA) {
CanHandleTerminators = true;
}
void DefaultVLIWScheduler::schedule() {
// Build the scheduling graph.
- buildSchedGraph(nullptr);
+ buildSchedGraph(AA);
}
// VLIWPacketizerList Ctor
VLIWPacketizerList::VLIWPacketizerList(MachineFunction &MF,
- MachineLoopInfo &MLI)
- : MF(MF) {
+ MachineLoopInfo &MLI, AliasAnalysis *AA)
+ : MF(MF), AA(AA) {
TII = MF.getSubtarget().getInstrInfo();
ResourceTracker = TII->CreateTargetScheduleState(MF.getSubtarget());
- VLIWScheduler = new DefaultVLIWScheduler(MF, MLI);
+ VLIWScheduler = new DefaultVLIWScheduler(MF, MLI, AA);
}
// VLIWPacketizerList Dtor
public:
// Ctor.
R600PacketizerList(MachineFunction &MF, MachineLoopInfo &MLI)
- : VLIWPacketizerList(MF, MLI), TII(static_cast<const R600InstrInfo *>(
+ : VLIWPacketizerList(MF, MLI, nullptr),
+ TII(static_cast<const R600InstrInfo *>(
MF.getSubtarget().getInstrInfo())),
TRI(TII->getRegisterInfo()) {
VLIW5 = !MF.getSubtarget<AMDGPUSubtarget>().hasCaymanISA();
HexagonPacketizerList::HexagonPacketizerList(
MachineFunction &MF, MachineLoopInfo &MLI,
const MachineBranchProbabilityInfo *MBPI)
- : VLIWPacketizerList(MF, MLI) {
+ : VLIWPacketizerList(MF, MLI, nullptr) {
this->MBPI = MBPI;
}