38 #define DEBUG_TYPE "ppc-vsx-copy"
68 return IsRegInClass(Reg, &PPC::VSRCRegClass, MRI);
72 return IsRegInClass(Reg, &PPC::VRRCRegClass, MRI);
76 return IsRegInClass(Reg, &PPC::F8RCRegClass, MRI);
80 return IsRegInClass(Reg, &PPC::VSFRCRegClass, MRI);
84 return IsRegInClass(Reg, &PPC::VSSRCRegClass, MRI);
108 "Unknown source for a VSX copy");
112 TII->get(TargetOpcode::SUBREG_TO_REG), NewVReg)
120 }
else if (!IsVSReg(DstMO.
getReg(),
MRI) &&
129 "Unknown destination for a VSX copy");
154 bool Changed =
false;
172 "PowerPC VSX Copy Legalization",
false,
false)
174 char PPCVSXCopy::
ID = 0;
void initializePPCVSXCopyPass(PassRegistry &)
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
unsigned createVirtualRegister(const TargetRegisterClass *RegClass)
createVirtualRegister - Create and return a new virtual register in the function with the specified r...
bool hasSubClassEq(const TargetRegisterClass *RC) const
Returns true if RC is a sub-class of or equal to this class.
static bool isVirtualRegister(unsigned Reg)
Return true if the specified register number is in the virtual register namespace.
static MCDisassembler::DecodeStatus addOperand(MCInst &Inst, const MCOperand &Opnd)
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
const TargetRegisterClass * getRegClass(unsigned Reg) const
Return the register class of the specified virtual register.
Reg
All possible values of the reg field in the ModR/M byte.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
static GCRegistry::Add< OcamlGC > B("ocaml","ocaml 3.10-compatible GC")
TargetInstrInfo - Interface to description of machine instruction set.
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
unsigned const MachineRegisterInfo * MRI
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
FunctionPass * createPPCVSXCopyPass()
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
Iterator for intrusive lists based on ilist_node.
const PPCInstrInfo * getInstrInfo() const override
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Representation of each machine instruction.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
void setReg(unsigned Reg)
Change the register this operand corresponds to.
void setSubReg(unsigned subReg)
unsigned getReg() const
getReg - Returns the register number.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const MachineInstrBuilder & addOperand(const MachineOperand &MO) const
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
bool contains(unsigned Reg) const
Return true if the specified register is included in this register class.