llvm.org GIT mirror llvm / c57a70c
ScheduleDAGInstrs: Move LiveIntervals field to ScheduleDAGMI Now that ScheduleDAGInstrs doesn't need it anymore we can move the field down the class hierarcy to ScheduleDAGMI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254759 91177308-0d34-0410-b5e6-96231b3b80d8 Matthias Braun 4 years ago
3 changed file(s) with 9 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
227227 class ScheduleDAGMI : public ScheduleDAGInstrs {
228228 protected:
229229 AliasAnalysis *AA;
230 LiveIntervals *LIS;
230231 std::unique_ptr SchedImpl;
231232
232233 /// Topo - A topological ordering for SUnits which permits fast IsReachable
254255 public:
255256 ScheduleDAGMI(MachineSchedContext *C, std::unique_ptr S,
256257 bool RemoveKillFlags)
257 : ScheduleDAGInstrs(*C->MF, C->MLI, C->LIS, RemoveKillFlags),
258 AA(C->AA), SchedImpl(std::move(S)), Topo(SUnits, &ExitSU), CurrentTop(),
259 CurrentBottom(), NextClusterPred(nullptr), NextClusterSucc(nullptr) {
258 : ScheduleDAGInstrs(*C->MF, C->MLI, RemoveKillFlags), AA(C->AA),
259 LIS(C->LIS), SchedImpl(std::move(S)), Topo(SUnits, &ExitSU),
260 CurrentTop(), CurrentBottom(), NextClusterPred(nullptr),
261 NextClusterSucc(nullptr) {
260262 #ifndef NDEBUG
261263 NumInstrsScheduled = 0;
262264 #endif
264266
265267 // Provide a vtable anchor
266268 ~ScheduleDAGMI() override;
269
270 // Returns LiveIntervals instance for use in DAG mutators and such.
271 LiveIntervals *getLIS() const { return LIS; }
267272
268273 /// Return true if this DAG supports VReg liveness and RegPressure.
269274 virtual bool hasVRegLiveness() const { return false; }
2525 class MachineFrameInfo;
2626 class MachineLoopInfo;
2727 class MachineDominatorTree;
28 class LiveIntervals;
2928 class RegPressureTracker;
3029 class PressureDiffs;
3130
9089 protected:
9190 const MachineLoopInfo *MLI;
9291 const MachineFrameInfo *MFI;
93
94 /// Live Intervals provides reaching defs in preRA scheduling.
95 LiveIntervals *LIS;
9692
9793 /// TargetSchedModel provides an interface to the machine model.
9894 TargetSchedModel SchedModel;
171167 public:
172168 explicit ScheduleDAGInstrs(MachineFunction &mf,
173169 const MachineLoopInfo *mli,
174 LiveIntervals *LIS = nullptr,
175170 bool RemoveKillFlags = false);
176171
177172 ~ScheduleDAGInstrs() override {}
178
179 /// \brief Expose LiveIntervals for use in DAG mutators and such.
180 LiveIntervals *getLIS() const { return LIS; }
181173
182174 /// \brief Get the machine model for instruction scheduling.
183175 const TargetSchedModel *getSchedModel() const { return &SchedModel; }
5050
5151 ScheduleDAGInstrs::ScheduleDAGInstrs(MachineFunction &mf,
5252 const MachineLoopInfo *mli,
53 LiveIntervals *LIS,
5453 bool RemoveKillFlags)
55 : ScheduleDAG(mf), MLI(mli), MFI(mf.getFrameInfo()), LIS(LIS),
54 : ScheduleDAG(mf), MLI(mli), MFI(mf.getFrameInfo()),
5655 RemoveKillFlags(RemoveKillFlags), CanHandleTerminators(false),
5756 TrackLaneMasks(false), FirstDbgValue(nullptr) {
5857 DbgValues.clear();