41#define DEBUG_TYPE "wasm-argument-move"
49 StringRef getPassName()
const override {
return "WebAssembly Argument Move"; }
60char WebAssemblyArgumentMoveLegacy::ID = 0;
62 "Move ARGUMENT instructions for WebAssembly",
false,
false)
65 return new WebAssemblyArgumentMoveLegacy();
70 dbgs() <<
"********** Argument Move **********\n"
71 <<
"********** Function: " << MF.
getName() <<
'\n';
90 EntryMBB.
insert(InsertPt,
MI.removeFromParent());
98bool 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.
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.
bool isArgument(unsigned Opc)
This is an optimization pass for GlobalISel generic memory operations.
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.