37 #define DEBUG_TYPE "ppc-vsx-copy" 63 return IsRegInClass(Reg, &PPC::VSRCRegClass, MRI);
67 return IsRegInClass(Reg, &PPC::VRRCRegClass, MRI);
71 return IsRegInClass(Reg, &PPC::F8RCRegClass, MRI);
75 return IsRegInClass(Reg, &PPC::VSFRCRegClass, MRI);
79 return IsRegInClass(Reg, &PPC::VSSRCRegClass, MRI);
103 "Unknown source for a VSX copy");
107 TII->
get(TargetOpcode::SUBREG_TO_REG), NewVReg)
115 }
else if (!IsVSReg(DstMO.
getReg(),
MRI) &&
124 "Unknown destination for a VSX copy");
149 bool Changed =
false;
167 "PowerPC VSX Copy Legalization",
false,
false)
void initializePPCVSXCopyPass(PassRegistry &)
const MachineInstrBuilder & add(const MachineOperand &MO) const
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
bool contains(unsigned Reg) const
Return true if the specified register is included in this register class.
This class represents lattice values for constants.
Register createVirtualRegister(const TargetRegisterClass *RegClass, StringRef Name="")
createVirtualRegister - Create and return a new virtual register in the function with the specified r...
const TargetRegisterClass * getRegClass(Register Reg) const
Return the register class of the specified virtual register.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
void setReg(Register Reg)
Change the register this operand corresponds to.
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.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
unsigned const MachineRegisterInfo * MRI
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
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.
bool hasSubClassEq(const TargetRegisterClass *RC) const
Returns true if RC is a sub-class of or equal to this class.
FunctionPass * createPPCVSXCopyPass()
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
Iterator for intrusive lists based on ilist_node.
const PPCInstrInfo * getInstrInfo() const override
static uint64_t add(uint64_t LeftOp, uint64_t RightOp)
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.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
void setSubReg(unsigned subReg)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool isVirtualRegister(unsigned Reg)
Return true if the specified register number is in the virtual register namespace.
Register getReg() const
getReg - Returns the register number.
Wrapper class representing virtual and physical registers.