LLVM 24.0.0git
X86LowerTileCopy.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "x86-lower-tile-copy"
#define GET_EGPR_IF_ENABLED(OPC)

Functions

static void emitACETileSpill (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const X86InstrInfo *TII, Register SrcReg, bool SrcKill, int TileSS, Register ScratchZMM)
 Emit the ACE tile spill sequence, storing SrcReg to TileSS.
static void addACETileRowAddr (MachineInstrBuilder &MIB, MachineInstr &MI, unsigned MemIdx, unsigned Row)
 Add tile row Row's address to MIB from MI's operands at MemIdx.
static void emitACETileReload (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const X86InstrInfo *TII, Register DstReg, Register ScratchZMM, function_ref< void(MachineInstrBuilder &, unsigned)> AddRowAddr)
 Reload DstReg through ScratchZMM, a row at a time from AddRowAddr.
static Register findScratchZMM (MachineFunction &MF, const TargetRegisterInfo *TRI, const LiveRegUnits &UsedRegs)
 Pick a ZMM that is dead here, or NoRegister if none is available.
 INITIALIZE_PASS_BEGIN (X86LowerTileCopyLegacy, DEBUG_TYPE, "Tile Copy Lowering", false, false) INITIALIZE_PASS_END(X86LowerTileCopyLegacy
static bool lowerTileCopy (MachineFunction &MF)

Variables

static const unsigned ACENumTileRows = 16
static const unsigned ACETileRowSize = 64
 DEBUG_TYPE
Tile Copy Lowering
Tile Copy false

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "x86-lower-tile-copy"

Definition at line 38 of file X86LowerTileCopy.cpp.

◆ GET_EGPR_IF_ENABLED

#define GET_EGPR_IF_ENABLED ( OPC)
Value:
(ST.hasEGPR() ? OPC##_EVEX : OPC)

Referenced by lowerTileCopy().

Function Documentation

◆ addACETileRowAddr()

void addACETileRowAddr ( MachineInstrBuilder & MIB,
MachineInstr & MI,
unsigned MemIdx,
unsigned Row )
static

◆ emitACETileReload()

void emitACETileReload ( MachineBasicBlock & MBB,
MachineBasicBlock::iterator MI,
const X86InstrInfo * TII,
Register DstReg,
Register ScratchZMM,
function_ref< void(MachineInstrBuilder &, unsigned)> AddRowAddr )
static

Reload DstReg through ScratchZMM, a row at a time from AddRowAddr.

Definition at line 82 of file X86LowerTileCopy.cpp.

References ACENumTileRows, llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::Kill, MBB, MI, llvm::NoFlags, TII, and llvm::Undef.

Referenced by lowerTileCopy().

◆ emitACETileSpill()

void emitACETileSpill ( MachineBasicBlock & MBB,
MachineBasicBlock::iterator MI,
const X86InstrInfo * TII,
Register SrcReg,
bool SrcKill,
int TileSS,
Register ScratchZMM )
static

Emit the ACE tile spill sequence, storing SrcReg to TileSS.

Definition at line 46 of file X86LowerTileCopy.cpp.

References ACENumTileRows, ACETileRowSize, llvm::addFrameReference(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::getKillRegState(), llvm::Kill, MBB, MI, and TII.

Referenced by lowerTileCopy().

◆ findScratchZMM()

Register findScratchZMM ( MachineFunction & MF,
const TargetRegisterInfo * TRI,
const LiveRegUnits & UsedRegs )
static

Pick a ZMM that is dead here, or NoRegister if none is available.

Definition at line 103 of file X86LowerTileCopy.cpp.

References llvm::LiveRegUnits::available(), llvm::BitVector::set_bits(), and TRI.

Referenced by lowerTileCopy().

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( X86LowerTileCopyLegacy ,
DEBUG_TYPE ,
"Tile Copy Lowering" ,
false ,
false  )

References DEBUG_TYPE.

◆ lowerTileCopy()

Variable Documentation

◆ ACENumTileRows

const unsigned ACENumTileRows = 16
static

Definition at line 42 of file X86LowerTileCopy.cpp.

◆ ACETileRowSize

const unsigned ACETileRowSize = 64
static

Definition at line 43 of file X86LowerTileCopy.cpp.

Referenced by addACETileRowAddr(), emitACETileSpill(), and lowerTileCopy().

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 135 of file X86LowerTileCopy.cpp.

◆ false

Tile Copy false

Definition at line 136 of file X86LowerTileCopy.cpp.

◆ Lowering

Tile Copy Lowering

Definition at line 135 of file X86LowerTileCopy.cpp.