31 #define DEBUG_TYPE "xfer"
47 return "Hexagon Split Const32s and Const64s";
60 "Hexagon Split Const32s and Const64s",
false,
false)
65 Fn.getTarget().getObjFileLowering());
74 for (
auto I =
B.begin(),
E =
B.end();
I !=
E; ) {
83 BuildMI(
B, MI, DL, TII->
get(Hexagon::A2_tfrsi), DestReg)
86 }
else if (Opc == Hexagon::CONST64) {
90 unsigned DestLo = TRI->
getSubReg(DestReg, Hexagon::isub_lo);
91 unsigned DestHi = TRI->
getSubReg(DestReg, Hexagon::isub_hi);
93 int32_t LowWord = (ImmValue & 0xFFFFFFFF);
94 int32_t HighWord = (ImmValue >> 32) & 0xFFFFFFFF;
96 BuildMI(
B, MI, DL, TII->
get(Hexagon::A2_tfrsi), DestLo)
98 BuildMI(
B, MI, DL, TII->
get(Hexagon::A2_tfrsi), DestHi)
114 return new HexagonSplitConst32AndConst64();
void initializeHexagonSplitConst32AndConst64Pass(PassRegistry &)
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
static GCRegistry::Add< OcamlGC > B("ocaml","ocaml 3.10-compatible GC")
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-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.
const MachineOperand & getOperand(unsigned i) const
unsigned getSubReg(unsigned Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
FunctionPass class - This class is used to implement most global optimizations.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
MachineFunctionProperties & set(Property P)
Representation of each machine instruction.
FunctionPass * createHexagonSplitConst32AndConst64()
bool isSmallDataEnabled() const
unsigned getReg() const
getReg - Returns the register number.
StringRef - Represent a constant reference to a string, i.e.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
INITIALIZE_PASS(HexagonSplitConst32AndConst64,"split-const-for-sdata","Hexagon Split Const32s and Const64s", false, false) bool HexagonSplitConst32AndConst64
Properties which a MachineFunction may have at a given point in time.