LLVM: lib/Target/X86/X86MacroFusion.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

20

21using namespace llvm;

22

26

31

32

33

34

40

41

42 if (!(ST.hasBranchFusion() || ST.hasMacroFusion()))

43 return false;

44

46

48 return false;

49

50 if (FirstMI == nullptr)

51 return true;

52

54

55 if (ST.hasBranchFusion()) {

56

59 }

60

61 if (ST.hasMacroFusion()) {

63 }

64

66}

67

68namespace llvm {

69

74

75}

const TargetInstrInfo & TII

static X86::SecondMacroFusionInstKind classifySecond(const MachineInstr &MI)

Definition X86MacroFusion.cpp:27

static X86::FirstMacroFusionInstKind classifyFirst(const MachineInstr &MI)

Definition X86MacroFusion.cpp:23

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.

LLVM_ABI 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 X86TargetMachine::c...

Definition X86MacroFusion.cpp:70

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.