LLVM  10.0.0svn
Namespaces | Enumerations | Functions
X86MacroFusion.cpp File Reference
#include "X86MacroFusion.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.

Namespaces

 llvm
 This class represents lattice values for constants.
 

Enumerations

enum  FirstInstrKind
 
enum  JumpKind
 

Functions

static FirstInstrKind classifyFirst (const MachineInstr &MI)
 
static JumpKind 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...
 

Enumeration Type Documentation

◆ FirstInstrKind

enum FirstInstrKind
strong

Definition at line 24 of file X86MacroFusion.cpp.

◆ JumpKind

enum JumpKind
strong

Definition at line 27 of file X86MacroFusion.cpp.

Function Documentation

◆ classifyFirst()

static FirstInstrKind classifyFirst ( const MachineInstr MI)
static

Definition at line 40 of file X86MacroFusion.cpp.

References llvm::MachineInstr::getOpcode(), and llvm::MachO::Invalid.

Referenced by shouldScheduleAdjacent().

◆ classifySecond()

static JumpKind classifySecond ( const MachineInstr MI)
static

◆ shouldScheduleAdjacent()

static bool shouldScheduleAdjacent ( const TargetInstrInfo TII,
const TargetSubtargetInfo TSI,
const MachineInstr FirstMI,
const MachineInstr SecondMI 
)
static

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 180 of file X86MacroFusion.cpp.

References classifyFirst(), classifySecond(), llvm::X86Subtarget::hasBranchFusion(), llvm::X86Subtarget::hasMacroFusion(), llvm::MachO::Invalid, llvm_unreachable, and llvm::ARM_MB::ST.