22#define RISCV_POST_RA_EXPAND_PSEUDO_NAME \
23 "RISC-V post-regalloc pseudo instruction expansion pass"
48char RISCVPostRAExpandPseudo::ID = 0;
50bool RISCVPostRAExpandPseudo::runOnMachineFunction(
MachineFunction &MF) {
74 switch (
MBBI->getOpcode()) {
75 case RISCV::PseudoMovImm:
77 case RISCV::PseudoMovAddr:
78 return expandMovAddr(
MBB,
MBBI);
88 int64_t Val =
MBBI->getOperand(1).getImm();
91 bool DstIsDead =
MBBI->getOperand(0).isDead();
92 bool Renamable =
MBBI->getOperand(0).isRenamable();
106 bool DstIsDead =
MBBI->getOperand(0).isDead();
107 bool Renamable =
MBBI->getOperand(0).isRenamable();
128 return new RISCVPostRAExpandPseudo();
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
MachineBasicBlock MachineBasicBlock::iterator MBBI
const HexagonInstrInfo * TII
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
#define RISCV_POST_RA_EXPAND_PSEUDO_NAME
FunctionPass class - This class is used to implement most global optimizations.
void eraseFromParent()
This method unlinks 'this' from the containing function and deletes it.
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...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
const MachineInstrBuilder & add(const MachineOperand &MO) const
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
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.
virtual const TargetInstrInfo * getInstrInfo() const
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
@ Define
Register definition.
@ Kill
The last use of a register.
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.
FunctionPass * createRISCVPostRAExpandPseudoPass()
unsigned getDeadRegState(bool B)
unsigned getRenamableRegState(bool B)