LLVM  14.0.0git
Macros | Functions
WebAssemblyPrepareForLiveIntervals.cpp File Reference
#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "Utils/WebAssemblyUtilities.h"
#include "WebAssembly.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "WebAssemblySubtarget.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for WebAssemblyPrepareForLiveIntervals.cpp:

Go to the source code of this file.


#define DEBUG_TYPE   "wasm-prepare-for-live-intervals"


 INITIALIZE_PASS (WebAssemblyPrepareForLiveIntervals, DEBUG_TYPE, "Fix up code for LiveIntervals", false, false) FunctionPass *llvm
static bool hasArgumentDef (unsigned Reg, const MachineRegisterInfo &MRI)

Detailed Description

Fix up code to meet LiveInterval's requirements.

Some CodeGen passes don't preserve LiveInterval's requirements, because they run after register allocation and it isn't important. However, WebAssembly runs LiveIntervals in a late pass. This pass transforms code to meet LiveIntervals' requirements; primarily, it ensures that all virtual register uses have definitions (IMPLICIT_DEF definitions if nothing else).

Definition in file WebAssemblyPrepareForLiveIntervals.cpp.

Macro Definition Documentation


#define DEBUG_TYPE   "wasm-prepare-for-live-intervals"

Definition at line 34 of file WebAssemblyPrepareForLiveIntervals.cpp.

Function Documentation

◆ hasArgumentDef()

static bool hasArgumentDef ( unsigned  Reg,
const MachineRegisterInfo MRI 


INITIALIZE_PASS ( WebAssemblyPrepareForLiveIntervals  ,
"Fix up code for LiveIntervals ,
false  ,

Definition at line 57 of file WebAssemblyPrepareForLiveIntervals.cpp.