27#define DEBUG_TYPE "wasm-mclower-prepass"
30class WebAssemblyMCLowerPrePass final :
public ModulePass {
32 return "WebAssembly MC Lower Pre Pass";
48char WebAssemblyMCLowerPrePass::ID = 0;
51 "Collects information ahead of time for MC lowering",
55 return new WebAssemblyMCLowerPrePass();
65bool WebAssemblyMCLowerPrePass::runOnModule(
Module &M) {
66 auto *MMIWP = getAnalysisIfAvailable<MachineModuleInfoWrapperPass>();
79 "********** Function: "
83 for (
auto &
MI :
MBB) {
85 if (
MI.isDebugInstr() ||
MI.isInlineAsm())
Module.h This file contains the declarations for the Module class.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
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.
void setPreservesCFG()
This function should be called by the pass, iff they do not:
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
MachineModuleInfoWasm - This is a MachineModuleInfoImpl implementation for Wasm targets.
SetVector< StringRef > MachineSymbolsUsed
This class contains meta information specific to a module.
Ty & getObjFileInfo()
Keep track of various per-module pieces of information for backends that would like to do so.
MachineFunction * getMachineFunction(const Function &F) const
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr.
MachineOperand class - Representation of each machine instruction operand.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
virtual bool runOnModule(Module &M)=0
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
A Module instance is used to store all the information related to an LLVM module.
virtual void getAnalysisUsage(AnalysisUsage &) const
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
StringRef - Represent a constant reference to a string, i.e.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
ModulePass * createWebAssemblyMCLowerPrePass()