37#define DEBUG_TYPE "x86-lower-tile-copy"
56char X86LowerTileCopy::ID = 0;
63void X86LowerTileCopy::getAnalysisUsage(
AnalysisUsage &AU)
const {
69 return new X86LowerTileCopy();
81 TRI->getAllocatableSet(MF,
TRI->getRegClass(X86::GR64RegClassID));
83 TRI->getAllocatableSet(MF,
TRI->getRegClass(X86::TILERegClassID));
88 UsedRegs.addLiveOuts(
MBB);
90 UsedRegs.stepBackward(
MI);
97 if (!X86::TILERegClass.
contains(DstReg, SrcReg))
101 unsigned Size =
TRI->getSpillSize(X86::TILERegClass);
102 Align Alignment =
TRI->getSpillAlign(X86::TILERegClass);
103 int TileSS = MF.getFrameInfo().CreateSpillStackObject(
Size, Alignment);
108 Register GR64Cand = X86::NoRegister;
109 for (
auto RegT : GR64Regs.set_bits()) {
110 if (UsedRegs.available(RegT)) {
124 Size =
TRI->getSpillSize(X86::GR64RegClass);
125 Alignment =
TRI->getSpillAlign(X86::GR64RegClass);
126 StrideSS = MF.getFrameInfo().CreateSpillStackObject(
Size, Alignment);
136#define GET_EGPR_IF_ENABLED(OPC) (ST.hasEGPR() ? OPC##_EVEX : OPC)
142 MO->
setReg(GR64Cand ? GR64Cand : X86::RAX);
145#undef GET_EGPR_IF_ENABLED
149 MO->
setReg(GR64Cand ? GR64Cand : X86::RAX);
157 MI.eraseFromParent();
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
const HexagonInstrInfo * TII
unsigned const TargetRegisterInfo * TRI
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
#define GET_EGPR_IF_ENABLED(OPC)
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
A set of register units used to track register liveness.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
virtual bool runOnMachineFunction(MachineFunction &MF)=0
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
Representation of each machine instruction.
const MachineOperand & getOperand(unsigned i) const
MachineOperand class - Representation of each machine instruction operand.
void setReg(Register Reg)
Change the register this operand corresponds to.
void setIsKill(bool Val=true)
Register getReg() const
getReg - Returns the register number.
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
Wrapper class representing virtual and physical registers.
StringRef - Represent a constant reference to a string, i.e.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
X86MachineFunctionInfo - This class is derived from MachineFunction and contains private X86 target-s...
AMXProgModelEnum getAMXProgModel() const
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
iterator_range< early_inc_iterator_impl< detail::IterOfRange< RangeT > > > make_early_inc_range(RangeT &&Range)
Make a range that does early increment to allow mutation of the underlying range without disrupting i...
static const MachineInstrBuilder & addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset=0, bool mem=true)
addFrameReference - This function is used to add a reference to the base of an abstract object on the...
FunctionPass * createX86LowerTileCopyPass()
Return a pass that lower the tile copy instruction.
auto reverse(ContainerTy &&C)
unsigned getKillRegState(bool B)
This struct is a compact representation of a valid (non-zero power of two) alignment.