Index: include/llvm/CodeGen/MachineScheduler.h =================================================================== --- include/llvm/CodeGen/MachineScheduler.h +++ include/llvm/CodeGen/MachineScheduler.h @@ -997,6 +997,22 @@ void pickNodeFromQueue(SchedCandidate &Cand); }; +std::unique_ptr +createLoadClusterDAGMutation(const TargetInstrInfo *TII, + const TargetRegisterInfo *TRI); + +std::unique_ptr +createStoreClusterDAGMutation(const TargetInstrInfo *TII, + const TargetRegisterInfo *TRI); + +std::unique_ptr +createMacroFusionDAGMutation(const TargetInstrInfo &TII, + const TargetRegisterInfo &TRI); + +std::unique_ptr +createCopyConstrainDAGMutation(const TargetInstrInfo *TII, + const TargetRegisterInfo *TRI); + } // namespace llvm #endif Index: lib/CodeGen/MachineScheduler.cpp =================================================================== --- lib/CodeGen/MachineScheduler.cpp +++ lib/CodeGen/MachineScheduler.cpp @@ -1396,6 +1396,22 @@ }; } // anonymous +namespace llvm { + +std::unique_ptr +createLoadClusterDAGMutation(const TargetInstrInfo *TII, + const TargetRegisterInfo *TRI) { + return make_unique(TII, TRI); +} + +std::unique_ptr +createStoreClusterDAGMutation(const TargetInstrInfo *TII, + const TargetRegisterInfo *TRI) { + return make_unique(TII, TRI); +} + +} // namespace llvm + void BaseMemOpClusterMutation::clusterNeighboringMemOps( ArrayRef MemOps, ScheduleDAGMI *DAG) { SmallVector MemOpRecords; @@ -1497,6 +1513,16 @@ }; } // anonymous +namespace llvm { + +std::unique_ptr +createMacroFusionDAGMutation(const TargetInstrInfo &TII, + const TargetRegisterInfo &TRI) { + return make_unique(TII, TRI); +} + +} // namespace llvm + /// Returns true if \p MI reads a register written by \p Other. static bool HasDataDep(const TargetRegisterInfo &TRI, const MachineInstr &MI, const MachineInstr &Other) { @@ -1573,6 +1599,16 @@ }; } // anonymous +namespace llvm { + +std::unique_ptr +createCopyConstrainDAGMutation(const TargetInstrInfo *TII, + const TargetRegisterInfo *TRI) { + return make_unique(TII, TRI); +} + +} // namespace llvm + /// constrainLocalCopy handles two possibilities: /// 1) Local src: /// I0: = dst