LLVM 19.0.0git
Macros | Functions
WebAssemblyDebugFixup.cpp File Reference

Several prior passes may "stackify" registers, here we ensure any references in such registers in debug_value instructions become stack relative also. More...

#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "WebAssembly.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "WebAssemblySubtarget.h"
#include "WebAssemblyUtilities.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "wasm-debug-fixup"
 

Functions

 INITIALIZE_PASS (WebAssemblyDebugFixup, DEBUG_TYPE, "Ensures debug_value's that have been stackified become stack relative", false, false) FunctionPass *llvm
 
static void setDanglingDebugValuesUndef (MachineBasicBlock &MBB, const TargetInstrInfo *TII)
 

Detailed Description

Several prior passes may "stackify" registers, here we ensure any references in such registers in debug_value instructions become stack relative also.

This is done in a separate pass such that not all previous passes need to track stack depth when values get stackified.

Definition in file WebAssemblyDebugFixup.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "wasm-debug-fixup"

Definition at line 33 of file WebAssemblyDebugFixup.cpp.

Function Documentation

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( WebAssemblyDebugFixup  ,
DEBUG_TYPE  ,
"Ensures debug_value's that have been stackified become stack relative"  ,
false  ,
false   
)

Definition at line 53 of file WebAssemblyDebugFixup.cpp.

◆ setDanglingDebugValuesUndef()

static void setDanglingDebugValuesUndef ( MachineBasicBlock MBB,
const TargetInstrInfo TII 
)
static

Definition at line 68 of file WebAssemblyDebugFixup.cpp.

References llvm::dbgs(), LLVM_DEBUG, llvm::make_early_inc_range(), MBB, and MI.