LLVM  16.0.0git
Classes | Macros | Functions
GCNVOPDUtils.cpp File Reference
#include "GCNVOPDUtils.h"
#include "AMDGPUSubtarget.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIInstrInfo.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/MacroFusion.h"
#include "llvm/CodeGen/ScheduleDAG.h"
#include "llvm/CodeGen/ScheduleDAGMutation.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/MC/MCInst.h"
Include dependency graph for GCNVOPDUtils.cpp:

Go to the source code of this file.

Classes

struct  VOPDPairingMutation
 Adapts design from MacroFusion Puts valid candidate instructions back-to-back so they can easily be turned into VOPD instructions Greedily pairs instruction candidates. More...
 

Macros

#define DEBUG_TYPE   "gcn-vopd-utils"
 

Functions

static bool shouldScheduleVOPDAdjacent (const TargetInstrInfo &TII, const TargetSubtargetInfo &TSI, const MachineInstr *FirstMI, const MachineInstr &SecondMI)
 Check if the instr pair, FirstMI and SecondMI, should be scheduled together. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "gcn-vopd-utils"

Definition at line 35 of file GCNVOPDUtils.cpp.

Function Documentation

◆ shouldScheduleVOPDAdjacent()

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

Check if the instr pair, FirstMI and SecondMI, should be scheduled together.

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

Definition at line 117 of file GCNVOPDUtils.cpp.

References llvm::checkVOPDRegConstraints(), llvm::AMDGPU::getCanBeVOPD(), llvm::MachineInstr::getOpcode(), and TII.

Referenced by llvm::createVOPDPairingMutation().