#include "RISCV.h"
#include "RISCVInstrInfo.h"
#include "RISCVTargetMachine.h"
#include "llvm/CodeGen/LivePhysRegs.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/MC/MCContext.h"
usingnamespacellvm;
#define RISCV_EXPAND_PSEUDO_NAME …
#define RISCV_PRERA_EXPAND_PSEUDO_NAME …
namespace {
class RISCVExpandPseudo : public MachineFunctionPass { … };
char RISCVExpandPseudo::ID = …;
bool RISCVExpandPseudo::runOnMachineFunction(MachineFunction &MF) { … }
bool RISCVExpandPseudo::expandMBB(MachineBasicBlock &MBB) { … }
bool RISCVExpandPseudo::expandMI(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI) { … }
bool RISCVExpandPseudo::expandCCOp(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI) { … }
bool RISCVExpandPseudo::expandVMSET_VMCLR(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI,
unsigned Opcode) { … }
bool RISCVExpandPseudo::expandMV_FPR16INX(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI) { … }
bool RISCVExpandPseudo::expandMV_FPR32INX(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI) { … }
bool RISCVExpandPseudo::expandRV32ZdinxStore(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI) { … }
bool RISCVExpandPseudo::expandRV32ZdinxLoad(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI) { … }
class RISCVPreRAExpandPseudo : public MachineFunctionPass { … };
char RISCVPreRAExpandPseudo::ID = …;
bool RISCVPreRAExpandPseudo::runOnMachineFunction(MachineFunction &MF) { … }
bool RISCVPreRAExpandPseudo::expandMBB(MachineBasicBlock &MBB) { … }
bool RISCVPreRAExpandPseudo::expandMI(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI) { … }
bool RISCVPreRAExpandPseudo::expandAuipcInstPair(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI, unsigned FlagsHi,
unsigned SecondOpcode) { … }
bool RISCVPreRAExpandPseudo::expandLoadLocalAddress(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI) { … }
bool RISCVPreRAExpandPseudo::expandLoadGlobalAddress(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI) { … }
bool RISCVPreRAExpandPseudo::expandLoadTLSIEAddress(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI) { … }
bool RISCVPreRAExpandPseudo::expandLoadTLSGDAddress(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI) { … }
bool RISCVPreRAExpandPseudo::expandLoadTLSDescAddress(
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator &NextMBBI) { … }
}
INITIALIZE_PASS(…)
INITIALIZE_PASS(…)
namespace llvm {
FunctionPass *createRISCVExpandPseudoPass() { … }
FunctionPass *createRISCVPreRAExpandPseudoPass() { … }
}