25 #define SYSTEMZ_EXPAND_PSEUDO_NAME "SystemZ pseudo instruction expansion pass" 60 return new SystemZExpandPseudo();
79 for (
auto I = std::prev(MBB.
end());
I != MBBI; --
I)
80 LiveRegs.stepBackward(*
I);
87 for (
auto I = LiveRegs.begin();
I != LiveRegs.end(); ++
I)
94 for (
auto I = LiveRegs.begin();
I != LiveRegs.end(); ++
I)
100 .addImm(CCValid).
addImm(CCMask ^ CCValid).
addMBB(RestMBB);
107 MI.getOperand(2).isKill());
110 NextMBBI = MBB.
end();
111 MI.eraseFromParent();
122 case SystemZ::LOCRMux:
123 return expandLOCRMux(MBB, MBBI, NextMBBI);
138 Modified |= expandMI(MBB, MBBI, NMBBI);
150 Modified |= expandMBB(MBB);
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.
void transferSuccessors(MachineBasicBlock *FromMBB)
Transfers all the successors from MBB to this machine basic block (i.e., copies all the successors Fr...
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.
#define SYSTEMZ_EXPAND_PSEUDO_NAME
virtual const TargetInstrInfo * getInstrInfo() const
MachineBasicBlock * CreateMachineBasicBlock(const BasicBlock *bb=nullptr)
CreateMachineBasicBlock - Allocate a new MachineBasicBlock.
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
void addLiveIn(MCPhysReg PhysReg, LaneBitmask LaneMask=LaneBitmask::getAll())
Adds the specified register as a live in.
LLVM Basic Block Representation.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void addLiveOuts(const MachineBasicBlock &MBB)
Adds all live-out registers of basic block MBB.
FunctionPass class - This class is used to implement most global optimizations.
This file implements the LivePhysRegs utility for tracking liveness of physical registers.
FunctionPass * createSystemZExpandPseudoPass(SystemZTargetMachine &TM)
Iterator for intrusive lists based on ilist_node.
void addSuccessor(MachineBasicBlock *Succ, BranchProbability Prob=BranchProbability::getUnknown())
Add Succ as a successor of this MachineBasicBlock.
void initializeSystemZExpandPseudoPass(PassRegistry &)
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override
Emit instructions to copy a pair of physical registers.
Representation of each machine instruction.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
void splice(iterator Where, MachineBasicBlock *Other, iterator From)
Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before '...
A set of physical registers with utility functions to track liveness when walking backward/forward th...
const BasicBlock * getBasicBlock() const
Return the LLVM basic block that this instance corresponded to originally.
void insert(iterator MBBI, MachineBasicBlock *MBB)
INITIALIZE_PASS(SystemZExpandPseudo, "systemz-expand-pseudo", SYSTEMZ_EXPAND_PSEUDO_NAME, false, false) FunctionPass *llvm
Returns an instance of the pseudo instruction expansion pass.
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 MachineInstrBuilder & addMBB(MachineBasicBlock *MBB, unsigned char TargetFlags=0) const
const MachineOperand & getOperand(unsigned i) const