LLVM
8.0.1
|
Fix up code to meet LiveInterval's requirements. More...
#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "WebAssembly.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "WebAssemblySubtarget.h"
#include "WebAssemblyUtilities.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"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "wasm-prepare-for-live-intervals" |
Functions | |
INITIALIZE_PASS (WebAssemblyPrepareForLiveIntervals, DEBUG_TYPE, "Fix up code for LiveIntervals", false, false) FunctionPass *llvm | |
static bool | HasArgumentDef (unsigned Reg, const MachineRegisterInfo &MRI) |
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.
#define DEBUG_TYPE "wasm-prepare-for-live-intervals" |
Definition at line 35 of file WebAssemblyPrepareForLiveIntervals.cpp.
|
static |
Definition at line 66 of file WebAssemblyPrepareForLiveIntervals.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), llvm::BuildMI(), llvm::dbgs(), llvm::tgtok::Def, llvm::MachineRegisterInfo::def_instructions(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::getName(), llvm::MachineRegisterInfo::getNumVirtRegs(), llvm::MachineFunction::getProperties(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::TargetRegisterInfo::index2VirtReg(), llvm::MachineBasicBlock::insert(), llvm::WebAssembly::isArgument(), llvm::MachineRegisterInfo::leaveSSA(), llvm::LiveIntervalsID, LLVM_DEBUG, MI, MRI, Reg, llvm::MachineInstr::removeFromParent(), llvm::MachineFunctionProperties::set(), TII, llvm::MachineFunctionProperties::TracksLiveness, and llvm::MachineRegisterInfo::use_nodbg_empty().
INITIALIZE_PASS | ( | WebAssemblyPrepareForLiveIntervals | , |
DEBUG_TYPE | , | ||
"Fix up code for LiveIntervals" | , | ||
false | , | ||
false | |||
) |
Definition at line 58 of file WebAssemblyPrepareForLiveIntervals.cpp.