31 #define DEBUG_TYPE "xfer" 47 return "Hexagon Split Const32s and Const64s";
60 "Hexagon Split Const32s and Const64s",
false,
false)
65 auto &TLOF = *HTM.getObjFileLowering();
66 if (HST.useSmallData() && TLOF.isSmallDataEnabled(HTM))
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)
113 return new HexagonSplitConst32AndConst64();
void initializeHexagonSplitConst32AndConst64Pass(PassRegistry &)
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents lattice values for constants.
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
unsigned getReg() const
getReg - Returns the register number.
unsigned const TargetRegisterInfo * TRI
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
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")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
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...
INITIALIZE_PASS(HexagonSplitConst32AndConst64, "split-const-for-sdata", "Hexagon Split Const32s and Const64s", false, false) bool HexagonSplitConst32AndConst64
MachineFunctionProperties & set(Property P)
Representation of each machine instruction.
FunctionPass * createHexagonSplitConst32AndConst64()
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
StringRef - Represent a constant reference to a string, i.e.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
const MachineOperand & getOperand(unsigned i) const
Properties which a MachineFunction may have at a given point in time.