22#define DEBUG_TYPE "wasm-nullify-dbg-value-lists"
27 return "WebAssembly Nullify DBG_VALUE_LISTs";
38char WebAssemblyNullifyDebugValueLists::ID = 0;
40 "WebAssembly Nullify DBG_VALUE_LISTs",
false,
false)
43 return new WebAssemblyNullifyDebugValueLists();
46bool WebAssemblyNullifyDebugValueLists::runOnMachineFunction(
48 LLVM_DEBUG(
dbgs() <<
"********** Nullify DBG_VALUE_LISTs **********\n"
49 "********** Function: "
55 if (
MI.getOpcode() == TargetOpcode::DBG_VALUE_LIST)
61 for (
auto *DVL : DbgValueLists) {
62 BuildMI(*DVL->getParent(), DVL, DVL->getDebugLoc(),
63 TII.get(TargetOpcode::DBG_VALUE),
false,
Register(),
64 DVL->getOperand(0).getMetadata(), DVL->getOperand(1).getMetadata());
65 DVL->eraseFromParent();
68 return !DbgValueLists.empty();
const HexagonInstrInfo * TII
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This file declares the WebAssembly-specific subclass of TargetSubtarget.
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...
virtual bool runOnMachineFunction(MachineFunction &MF)=0
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
Wrapper class representing virtual and physical registers.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
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.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FunctionPass * createWebAssemblyNullifyDebugValueLists()