30#define DEBUG_TYPE "xfer"
46 return "Hexagon Split Const32s and Const64s";
51 MachineFunctionProperties::Property::NoVRegs);
56char HexagonSplitConst32AndConst64::ID = 0;
59 "Hexagon Split Const32s and Const64s",
false,
false)
64 auto &TLOF = *HTM.getObjFileLowering();
65 if (HST.useSmallData() && TLOF.isSmallDataEnabled(HTM))
74 unsigned Opc =
MI.getOpcode();
76 if (Opc == Hexagon::CONST32) {
83 }
else if (Opc == Hexagon::CONST64) {
85 int64_t ImmValue =
MI.getOperand(1).getImm();
87 Register DestLo =
TRI->getSubReg(DestReg, Hexagon::isub_lo);
88 Register DestHi =
TRI->getSubReg(DestReg, Hexagon::isub_hi);
90 int32_t LowWord = (ImmValue & 0xFFFFFFFF);
91 int32_t HighWord = (ImmValue >> 32) & 0xFFFFFFFF;
110 return new HexagonSplitConst32AndConst64();
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
const HexagonInstrInfo * TII
unsigned const TargetRegisterInfo * TRI
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
FunctionPass class - This class is used to implement most global optimizations.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
virtual bool runOnMachineFunction(MachineFunction &MF)=0
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
virtual MachineFunctionProperties getRequiredProperties() const
Properties which a MachineFunction may have at a given point in time.
MachineFunctionProperties & set(Property P)
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
Representation of each machine instruction.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
Wrapper class representing virtual and physical registers.
StringRef - Represent a constant reference to a string, i.e.
TargetInstrInfo - Interface to description of machine instruction set.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
void initializeHexagonSplitConst32AndConst64Pass(PassRegistry &)
iterator_range< early_inc_iterator_impl< detail::IterOfRange< RangeT > > > make_early_inc_range(RangeT &&Range)
Make a range that does early increment to allow mutation of the underlying range without disrupting i...
FunctionPass * createHexagonSplitConst32AndConst64()