Go to the documentation of this file.
14 #ifndef LLVM_CODEGEN_MACROFUSION_H
15 #define LLVM_CODEGEN_MACROFUSION_H
23 class ScheduleDAGMutation;
24 class TargetInstrInfo;
25 class TargetSubtargetInfo;
26 class ScheduleDAGInstrs;
33 const TargetSubtargetInfo &TSI,
34 const MachineInstr *FirstMI,
52 std::unique_ptr<ScheduleDAGMutation>
58 std::unique_ptr<ScheduleDAGMutation>
63 #endif // LLVM_CODEGEN_MACROFUSION_H
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< ScheduleDAGMutation > createBranchMacroFusionDAGMutation(ShouldSchedulePredTy shouldScheduleAdjacent)
Create a DAG scheduling mutation to pair branch instructions with one of their predecessors back to b...
const HexagonInstrInfo * TII
bool fuseInstructionPair(ScheduleDAGInstrs &DAG, SUnit &FirstSU, SUnit &SecondSU)
Create an artificial edge between FirstSU and SecondSU.
std::unique_ptr< ScheduleDAGMutation > createMacroFusionDAGMutation(ShouldSchedulePredTy shouldScheduleAdjacent)
Create a DAG scheduling mutation to pair instructions back to back for instructions that benefit acco...
static bool shouldScheduleAdjacent(const TargetInstrInfo &TII, const TargetSubtargetInfo &TSI, const MachineInstr *FirstMI, const MachineInstr &SecondMI)
Check if the instr pair, FirstMI and SecondMI, should be fused together.
Representation of each machine instruction.
print Print MemDeps of function
bool hasLessThanNumFused(const SUnit &SU, unsigned FuseLimit)
Checks if the number of cluster edges between SU and its predecessors is less than FuseLimit.
Scheduling unit. This is a node in the scheduling DAG.
A ScheduleDAG for scheduling lists of MachineInstr.
std::function< bool(const TargetInstrInfo &TII, const TargetSubtargetInfo &TSI, const MachineInstr *FirstMI, const MachineInstr &SecondMI)> ShouldSchedulePredTy
Check if the instr pair, FirstMI and SecondMI, should be fused together.