29 #define DEBUG_TYPE "ppc-qpx-load-splat" 31 STATISTIC(NumSimplified,
"Number of QPX load splats simplified");
43 return "PowerPC QPX Load Splat Simplification";
50 "PowerPC QPX Load Splat Simplification",
54 return new PPCQPXLoadSplat();
61 bool MadeChange =
false;
64 for (
auto MFI = MF.
begin(), MFIE = MF.
end(); MFI != MFIE; ++MFI) {
68 for (
auto MBBI = MBB->
rbegin(); MBBI != MBB->
rend(); ++MBBI) {
100 if (SplatReg != SrcReg) {
103 unsigned SubRegIndex =
135 (SrcReg != SplatReg &&
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
bool isCall(QueryType Type=AnyInBundle) const
This class represents lattice values for constants.
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
void push_back(const T &Elt)
void initializePPCQPXLoadSplatPass(PassRegistry &)
STATISTIC(NumFunctions, "Total number of functions")
unsigned const TargetRegisterInfo * TRI
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void substituteRegister(Register FromReg, Register ToReg, unsigned SubIdx, const TargetRegisterInfo &RegInfo)
Replace all occurrences of FromReg with ToReg:SubIdx, properly composing subreg indices where necessa...
void eraseFromParent()
Unlink 'this' from the containing basic block and delete it.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
unsigned getSubRegIndex(MCRegister RegNo, MCRegister SubRegNo) const
For a given register pair, return the sub-register index if the second register is a sub-register of ...
Register getSubReg(MCRegister Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
void setReg(Register Reg)
Change the register this operand corresponds to.
reverse_iterator rbegin()
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
INITIALIZE_PASS(PPCQPXLoadSplat, "ppc-qpx-load-splat", "PowerPC QPX Load Splat Simplification", false, false) FunctionPass *llvm
FunctionPass class - This class is used to implement most global optimizations.
GPRC, CHAIN = LFIWAX CHAIN, Ptr - This is a floating-point load which sign-extends from a 32-bit inte...
QVESPLATI = This corresponds to the QPX qvesplati instruction.
iterator erase(const_iterator CI)
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
bool readsRegister(Register Reg, const TargetRegisterInfo *TRI=nullptr) const
Return true if the MachineInstr reads the specified register.
bool modifiesRegister(Register Reg, const TargetRegisterInfo *TRI) const
Return true if the MachineInstr modifies (fully define or partially define) the specified register...
const Function & getFunction() const
Return the LLVM function that this machine code represents.
Representation of each machine instruction.
FunctionPass * createPPCQPXLoadSplatPass()
bool hasUnmodeledSideEffects() const
Return true if this instruction has side effects that are not modeled by mayLoad / mayStore...
StringRef - Represent a constant reference to a string, i.e.
Register getReg() const
getReg - Returns the register number.
const MachineOperand & getOperand(unsigned i) const
GPRC, CHAIN = LFIWZX CHAIN, Ptr - This is a floating-point load which zero-extends from a 32-bit inte...
Wrapper class representing virtual and physical registers.