35 #define DEBUG_TYPE "wasm-prepare-for-live-intervals" 45 return "WebAssembly Prepare For LiveIntervals";
59 "Fix up code for LiveIntervals",
false,
false)
62 return new WebAssemblyPrepareForLiveIntervals();
73 bool WebAssemblyPrepareForLiveIntervals::runOnMachineFunction(
76 dbgs() <<
"********** Prepare For LiveIntervals **********\n" 77 <<
"********** Function: " << MF.
getName() <<
'\n';
86 "LiveIntervals shouldn't be active yet!");
110 TII.get(WebAssembly::IMPLICIT_DEF),
Reg);
116 for (
auto MII = Entry.
begin(), MIE = Entry.
end(); MII != MIE;) {
bool use_nodbg_empty(unsigned RegNo) const
use_nodbg_empty - Return true if there are no non-Debug instructions using the specified register...
This class represents lattice values for constants.
static unsigned index2VirtReg(unsigned Index)
Convert a 0-based index to a virtual register number.
static bool HasArgumentDef(unsigned Reg, const MachineRegisterInfo &MRI)
const MachineFunctionProperties & getProperties() const
Get the function properties.
This file contains the entry points for global functions defined in the LLVM WebAssembly back-end...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
char & LiveIntervalsID
LiveIntervals - This analysis keeps track of the live ranges of virtual and physical registers...
instr_iterator insert(instr_iterator I, MachineInstr *M)
Insert MI into the instruction list before I, possibly inside a bundle.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
This file contains the declaration of the WebAssembly-specific utility functions. ...
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
unsigned const MachineRegisterInfo * MRI
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
This file provides WebAssembly-specific target descriptions.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
INITIALIZE_PASS(WebAssemblyPrepareForLiveIntervals, DEBUG_TYPE, "Fix up code for LiveIntervals", false, false) FunctionPass *llvm
unsigned getNumVirtRegs() const
getNumVirtRegs - Return the number of virtual registers created.
This file declares the WebAssembly-specific subclass of TargetSubtarget.
bool isArgument(const MachineInstr &MI)
void setPreservesCFG()
This function should be called by the pass, iff they do not:
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
MachineFunctionProperties & set(Property P)
Representation of each machine instruction.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
This file declares WebAssembly-specific per-machine-function information.
MachineInstr * removeFromParent()
Unlink 'this' from the containing basic block, and return it without deleting it. ...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
iterator_range< def_instr_iterator > def_instructions(unsigned Reg) const
FunctionPass * createWebAssemblyPrepareForLiveIntervals()
StringRef - Represent a constant reference to a string, i.e.