41#define DEBUG_TYPE "wasm-argument-move"
49 StringRef getPassName()
const override {
return "WebAssembly Argument Move"; }
62char WebAssemblyArgumentMoveLegacy::ID = 0;
64 "Move ARGUMENT instructions for WebAssembly",
false,
false)
67 return new WebAssemblyArgumentMoveLegacy();
72 dbgs() <<
"********** Argument Move **********\n"
73 <<
"********** Function: " << MF.
getName() <<
'\n';
92 EntryMBB.
insert(InsertPt,
MI.removeFromParent());
100bool WebAssemblyArgumentMoveLegacy::runOnMachineFunction(
MachineFunction &MF) {
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
static bool argumentMove(MachineFunction &MF)
This file provides WebAssembly-specific target descriptions.
This file contains the declaration of the WebAssembly-specific utility functions.
This file contains the entry points for global functions defined in the LLVM WebAssembly back-end.
Represent the analysis usage information of a pass.
AnalysisUsage & addPreservedID(const void *ID)
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
LLVM_ABI void setPreservesCFG()
This function should be called by the pass, iff they do not:
Represents analyses that only rely on functions' control flow.
FunctionPass class - This class is used to implement most global optimizations.
LLVM_ABI instr_iterator insert(instr_iterator I, MachineInstr *M)
Insert MI into the instruction list before I, possibly inside a bundle.
MachineInstrBundleIterator< MachineInstr > iterator
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
const MachineBasicBlock & front() const
Representation of each machine instruction.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
PreservedAnalyses & preserveSet()
Mark an analysis set as preserved.
Represent a constant reference to a string, i.e.
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
Pass manager infrastructure for declaring and invalidating analyses.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
bool isArgument(unsigned Opc)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI char & MachineDominatorsID
MachineDominators - This pass is a machine dominators analysis pass.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
FunctionPass * createWebAssemblyArgumentMoveLegacyPass()
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.