24#define RISCV_POST_RA_EXPAND_PSEUDO_NAME \
25 "RISC-V post-regalloc pseudo instruction expansion pass"
50char RISCVPostRAExpandPseudo::ID = 0;
52bool RISCVPostRAExpandPseudo::runOnMachineFunction(
MachineFunction &MF) {
76 switch (
MBBI->getOpcode()) {
77 case RISCV::PseudoMovImm:
79 case RISCV::PseudoMovAddr:
80 return expandMovAddr(
MBB,
MBBI);
90 int64_t Val =
MBBI->getOperand(1).getImm();
93 bool DstIsDead =
MBBI->getOperand(0).isDead();
94 bool Renamable =
MBBI->getOperand(0).isRenamable();
108 bool DstIsDead =
MBBI->getOperand(0).isDead();
109 bool Renamable =
MBBI->getOperand(0).isRenamable();
130 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)