29#define DEBUG_TYPE "wasm-clean-code-after-trap"
38 return "WebAssembly Clean Code After Trap";
45char WebAssemblyCleanCodeAfterTrapLegacy::ID = 0;
47 "WebAssembly Clean Code After Trap",
false,
false)
50 return new WebAssemblyCleanCodeAfterTrapLegacy();
55 dbgs() <<
"********** CleanCodeAfterTrap **********\n"
56 <<
"********** Function: " << MF.
getName() <<
'\n';
62 bool HasTerminator =
false;
70 if (!RemoveMI.
empty()) {
79 MI->eraseFromParent();
85bool WebAssemblyCleanCodeAfterTrapLegacy::runOnMachineFunction(
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This file defines the SmallVector class.
static bool cleanCodeAfterTrap(MachineFunction &MF)
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.
Represents analyses that only rely on functions' control flow.
FunctionPass class - This class is used to implement most global optimizations.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
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.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
Pass manager infrastructure for declaring and invalidating analyses.
This is an optimization pass for GlobalISel generic memory operations.
FunctionPass * createWebAssemblyCleanCodeAfterTrapLegacyPass()
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.