39#define DEBUG_TYPE "x86-lower-tile-copy"
58char X86LowerTileCopy::ID = 0;
65void X86LowerTileCopy::getAnalysisUsage(
AnalysisUsage &AU)
const {
71 return new X86LowerTileCopy();
83 TRI->getAllocatableSet(MF,
TRI->getRegClass(X86::GR64RegClassID));
85 TRI->getAllocatableSet(MF,
TRI->getRegClass(X86::TILERegClassID));
90 UsedRegs.addLiveOuts(
MBB);
92 UsedRegs.stepBackward(
MI);
99 if (!X86::TILERegClass.
contains(DstReg, SrcReg))
103 unsigned Size =
TRI->getSpillSize(X86::TILERegClass);
104 Align Alignment =
TRI->getSpillAlign(X86::TILERegClass);
105 int TileSS = MF.getFrameInfo().CreateSpillStackObject(
Size, Alignment);
110 Register GR64Cand = X86::NoRegister;
111 for (
auto RegT : GR64Regs.set_bits()) {
112 if (UsedRegs.available(RegT)) {
126 Size =
TRI->getSpillSize(X86::GR64RegClass);
127 Alignment =
TRI->getSpillAlign(X86::GR64RegClass);
128 StrideSS = MF.getFrameInfo().CreateSpillStackObject(
Size, Alignment);
138#define GET_EGPR_IF_ENABLED(OPC) (ST.hasEGPR() ? OPC##_EVEX : OPC)
144 MO.
setReg(GR64Cand ? GR64Cand : X86::RAX);
148#undef GET_EGPR_IF_ENABLED
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.