LLVM 24.0.0git
X86LowerAMXType.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "x86-lower-amx-type"

Functions

static bool isAMXCast (Instruction *II)
static bool isAMXIntrinsic (Value *I)
static bool containsAMXCode (Function &F)
static bool isACEOnlyIntrinsic (Instruction *I)
static bool hasACEIncomingValue (PHINode *PHI)
static AllocaInst * createAllocaInstAtEntry (IRBuilder<> &Builder, BasicBlock *BB, Type *Ty)
static Instruction * getFirstNonAllocaInTheEntryBlock (Function &F)
static Value * getRowFromCol (Instruction *II, Value *V, unsigned Granularity)
std::pair< Value *, Value * > getShape (IntrinsicInst *II, unsigned OpNo)
static IntrinsicInst * getTileConsumer (PHINode *Phi, unsigned &OpNo)
static Intrinsic::ID getTilezeroIntrinsic (IntrinsicInst *Consumer)
static Value * createACETileFromVector (IRBuilder<> &Builder, Value *Vec, Value *Row, Value *Col)
static Value * createVectorFromACETile (IRBuilder<> &Builder, Value *Tile, Value *Row, Value *Col, Type *VecTy)
static Value * getAllocaPos (BasicBlock *BB)
static Instruction * createTileStore (Instruction *TileDef, Value *Ptr)
static void replaceWithTileLoad (Use &U, Value *Ptr, bool IsPHI=false)
static bool isIncomingOfPHI (Instruction *I)
 INITIALIZE_PASS_BEGIN (X86LowerAMXTypeLegacyPass, DEBUG_TYPE, PassName, false, false) INITIALIZE_PASS_END(X86LowerAMXTypeLegacyPass

Variables

static constexpr unsigned ACENumTileRows = 16
static constexpr unsigned ACERowNumElts = 16
static const char PassName [] = "Lower AMX type for load/store"
 DEBUG_TYPE
 false

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "x86-lower-amx-type"

Definition at line 69 of file X86LowerAMXType.cpp.

Function Documentation

◆ containsAMXCode()

bool containsAMXCode ( Function & F)
static

Definition at line 95 of file X86LowerAMXType.cpp.

References F, and I.

◆ createACETileFromVector()

Value * createACETileFromVector ( IRBuilder<> & Builder,
Value * Vec,
Value * Row,
Value * Col )
static

Definition at line 352 of file X86LowerAMXType.cpp.

References ACENumTileRows, ACERowNumElts, E(), and llvm::FixedVectorType::get().

◆ createAllocaInstAtEntry()

AllocaInst * createAllocaInstAtEntry ( IRBuilder<> & Builder,
BasicBlock * BB,
Type * Ty )
static

◆ createTileStore()

◆ createVectorFromACETile()

Value * createVectorFromACETile ( IRBuilder<> & Builder,
Value * Tile,
Value * Row,
Value * Col,
Type * VecTy )
static

◆ getAllocaPos()

◆ getFirstNonAllocaInTheEntryBlock()

Instruction * getFirstNonAllocaInTheEntryBlock ( Function & F)
static

Definition at line 166 of file X86LowerAMXType.cpp.

References F, I, llvm::isa(), and llvm_unreachable.

Referenced by getRowFromCol().

◆ getRowFromCol()

Value * getRowFromCol ( Instruction * II,
Value * V,
unsigned Granularity )
static

◆ getShape()

std::pair< Value *, Value * > getShape ( IntrinsicInst * II,
unsigned OpNo )

Definition at line 206 of file X86LowerAMXType.cpp.

References assert(), getRowFromCol(), II, and llvm_unreachable.

◆ getTileConsumer()

IntrinsicInst * getTileConsumer ( PHINode * Phi,
unsigned & OpNo )
static

◆ getTilezeroIntrinsic()

Intrinsic::ID getTilezeroIntrinsic ( IntrinsicInst * Consumer)
static

Definition at line 341 of file X86LowerAMXType.cpp.

References isACEOnlyIntrinsic().

◆ hasACEIncomingValue()

bool hasACEIncomingValue ( PHINode * PHI)
static

Definition at line 141 of file X86LowerAMXType.cpp.

References llvm::dyn_cast(), E(), I, isACEOnlyIntrinsic(), and PHI.

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( X86LowerAMXTypeLegacyPass ,
DEBUG_TYPE ,
PassName ,
false ,
false  )

◆ isACEOnlyIntrinsic()

bool isACEOnlyIntrinsic ( Instruction * I)
static

Definition at line 106 of file X86LowerAMXType.cpp.

References llvm::dyn_cast(), I, and II.

Referenced by getTilezeroIntrinsic(), and hasACEIncomingValue().

◆ isAMXCast()

◆ isAMXIntrinsic()

bool isAMXIntrinsic ( Value * I)
static

Definition at line 77 of file X86LowerAMXType.cpp.

References llvm::dyn_cast(), I, II, isAMXCast(), and V.

Referenced by getTileConsumer().

◆ isIncomingOfPHI()

bool isIncomingOfPHI ( Instruction * I)
static

Definition at line 682 of file X86LowerAMXType.cpp.

References I, llvm::isa(), and V.

◆ replaceWithTileLoad()

void replaceWithTileLoad ( Use & U,
Value * Ptr,
bool IsPHI = false )
static

Definition at line 657 of file X86LowerAMXType.cpp.

References assert(), llvm::cast(), II, llvm::User::replaceUsesOfWith(), and V.

Variable Documentation

◆ ACENumTileRows

unsigned ACENumTileRows = 16
staticconstexpr

◆ ACERowNumElts

unsigned ACERowNumElts = 16
staticconstexpr

Definition at line 349 of file X86LowerAMXType.cpp.

Referenced by createACETileFromVector().

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 1543 of file X86LowerAMXType.cpp.

◆ false

false

Definition at line 1543 of file X86LowerAMXType.cpp.

◆ PassName

PassName = "Lower AMX type for load/store"
static

Definition at line 1537 of file X86LowerAMXType.cpp.