42 if (!(ST.hasBranchFusion() || ST.hasMacroFusion()))
47 if (BranchKind == X86::SecondMacroFusionInstKind::Invalid)
50 if (FirstMI ==
nullptr)
55 if (ST.hasBranchFusion()) {
57 return (TestKind == X86::FirstMacroFusionInstKind::Cmp ||
58 TestKind == X86::FirstMacroFusionInstKind::Test);
61 if (ST.hasMacroFusion()) {
const HexagonInstrInfo * TII
static X86::SecondMacroFusionInstKind classifySecond(const MachineInstr &MI)
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.
static X86::FirstMacroFusionInstKind classifyFirst(const MachineInstr &MI)
Representation of each machine instruction.
TargetInstrInfo - Interface to description of machine instruction set.
TargetSubtargetInfo - Generic base class for all target subtargets.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
FirstMacroFusionInstKind classifyFirstOpcodeInMacroFusion(unsigned Opcode)
CondCode getCondFromBranch(const MachineInstr &MI)
SecondMacroFusionInstKind
SecondMacroFusionInstKind classifySecondCondCodeInMacroFusion(X86::CondCode CC)
bool isMacroFused(FirstMacroFusionInstKind FirstKind, SecondMacroFusionInstKind SecondKind)
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< ScheduleDAGMutation > createMacroFusionDAGMutation(ArrayRef< MacroFusionPredTy > Predicates, bool BranchOnly=false)
Create a DAG scheduling mutation to pair instructions back to back for instructions that benefit acco...
std::unique_ptr< ScheduleDAGMutation > createX86MacroFusionDAGMutation()
Note that you have to add: DAG.addMutation(createX86MacroFusionDAGMutation()); to X86PassConfig::crea...
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.