19#ifndef LLVM_CODEGEN_TILESHAPEINFO_H
20#define LLVM_CODEGEN_TILESHAPEINFO_H
33 : Row(Row), Col(Col) {
38 : Row(nullptr), Col(nullptr), RowImm(InvalidImmShape),
39 ColImm(InvalidImmShape) {}
47 if (Row->getReg() == R->getReg() && Col->getReg() ==
C->getReg())
49 if ((RowImm != InvalidImmShape) && (ColImm != InvalidImmShape))
62 bool isValid() {
return (Row !=
nullptr) && (Col !=
nullptr); }
69 int64_t Imm = InvalidImmShape;
71 const auto *
MI = DefMO.getParent();
72 if (
MI->isMoveImmediate()) {
73 if (
MI->getOperand(1).isImm()) {
74 Imm =
MI->getOperand(1).getImm();
76 assert(
MI->getOperand(1).isImplicit() &&
77 "Operand 1 is assumed to be implicit.");
86 RowImm =
GetImm(Row->getReg());
87 ColImm =
GetImm(Col->getReg());
91 static constexpr int64_t InvalidImmShape = -1;
unsigned const MachineRegisterInfo * MRI
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool GetImm(MachineInstr *MI, unsigned Op, int64_t &Imm)
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Wrapper class representing virtual and physical registers.
void deduceImm(const MachineRegisterInfo *MRI)
ShapeT(MachineOperand *Row, MachineOperand *Col, const MachineRegisterInfo *MRI=nullptr)
bool operator!=(const ShapeT &Shape) const
bool operator==(const ShapeT &Shape) const
MachineOperand * getRow() const
int64_t getColImm() const
MachineOperand * getCol() const
int64_t getRowImm() const
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.