LLVM
8.0.1
|
This file implements a pass that replaces physical registers with virtual registers. More...
#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "WebAssembly.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "WebAssemblySubtarget.h"
#include "llvm/CodeGen/MachineFunctionPass.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-replace-phys-regs" |
Functions | |
INITIALIZE_PASS (WebAssemblyReplacePhysRegs, DEBUG_TYPE, "Replace physical registers with virtual registers", false, false) FunctionPass *llvm | |
This file implements a pass that replaces physical registers with virtual registers.
LLVM expects certain physical registers, such as a stack pointer. However, WebAssembly doesn't actually have such physical registers. This pass is run once LLVM no longer needs these registers, and replaces them with virtual registers, so they can participate in register stackifying and coloring in the normal way.
Definition in file WebAssemblyReplacePhysRegs.cpp.
#define DEBUG_TYPE "wasm-replace-phys-regs" |
Definition at line 33 of file WebAssemblyReplacePhysRegs.cpp.
INITIALIZE_PASS | ( | WebAssemblyReplacePhysRegs | , |
DEBUG_TYPE | , | ||
"Replace physical registers with virtual registers" | , | ||
false | , | ||
false | |||
) |
Definition at line 56 of file WebAssemblyReplacePhysRegs.cpp.
References assert(), llvm::dbgs(), E, llvm::MachineFunction::getName(), llvm::MachineOperand::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::MachineInstr::isDebugValue(), llvm::MachineOperand::isImplicit(), llvm::LiveIntervalsID, LLVM_DEBUG, MRI, llvm::MachineOperand::setIsDebug(), llvm::MachineOperand::setReg(), and TRI.