LLVM: lib/Target/WebAssembly/WebAssemblyNullifyDebugValueLists.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
19using namespace llvm;
20
21#define DEBUG_TYPE "wasm-nullify-dbg-value-lists"
22
23namespace {
24class WebAssemblyNullifyDebugValueLists final : public MachineFunctionPass {
25 StringRef getPassName() const override {
26 return "WebAssembly Nullify DBG_VALUE_LISTs";
27 }
28
30
31public:
32 static char ID;
34};
35}
36
37char WebAssemblyNullifyDebugValueLists::ID = 0;
39 "WebAssembly Nullify DBG_VALUE_LISTs", false, false)
40
42 return new WebAssemblyNullifyDebugValueLists();
43}
44
45bool WebAssemblyNullifyDebugValueLists::runOnMachineFunction(
47 LLVM_DEBUG(dbgs() << "********** Nullify DBG_VALUE_LISTs **********\n"
48 "********** Function: "
51
52
53
54 for (auto &MBB : MF) {
56 if (MI.getOpcode() == TargetOpcode::DBG_VALUE_LIST) {
57 MI.setDebugValueUndef();
59 }
60 }
61 }
63}
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This file contains the entry points for global functions defined in the LLVM WebAssembly back-end.
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.
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.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FunctionPass * createWebAssemblyNullifyDebugValueLists()