LLVM  13.0.0git
Namespaces | Functions
X86MacroFusion.cpp File Reference
#include "X86MacroFusion.h"
#include "MCTargetDesc/X86BaseInfo.h"
#include "X86Subtarget.h"
#include "llvm/CodeGen/MacroFusion.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
Include dependency graph for X86MacroFusion.cpp:

Go to the source code of this file.




static X86::FirstMacroFusionInstKind classifyFirst (const MachineInstr &MI)
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. More...
std::unique_ptr< ScheduleDAGMutationllvm::createX86MacroFusionDAGMutation ()
 Note that you have to add: DAG.addMutation(createX86MacroFusionDAGMutation()); to X86PassConfig::createMachineScheduler() to have an effect. More...

Function Documentation

◆ classifyFirst()

static X86::FirstMacroFusionInstKind classifyFirst ( const MachineInstr MI)

Definition at line 22 of file X86MacroFusion.cpp.

References llvm::X86::classifyFirstOpcodeInMacroFusion(), and MI.

Referenced by shouldScheduleAdjacent().

◆ classifySecond()

static X86::SecondMacroFusionInstKind classifySecond ( const MachineInstr MI)

◆ shouldScheduleAdjacent()

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.

Given SecondMI, when FirstMI is unspecified, then check if SecondMI may be part of a fused pair at all.

Definition at line 34 of file X86MacroFusion.cpp.

References classifyFirst(), classifySecond(), llvm::X86::Cmp, llvm::X86::Invalid, llvm::X86::isMacroFused(), llvm_unreachable, llvm::ARM_MB::ST, and llvm::X86::Test.