LLVM
8.0.1
|
This file implements a virtual register coloring pass. More...
#include "WebAssembly.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.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-reg-coloring" |
Functions | |
INITIALIZE_PASS (WebAssemblyRegColoring, DEBUG_TYPE, "Minimize number of registers used", false, false) FunctionPass *llvm | |
static float | computeWeight (const MachineRegisterInfo *MRI, const MachineBlockFrequencyInfo *MBFI, unsigned VReg) |
This file implements a virtual register coloring pass.
WebAssembly doesn't have a fixed number of registers, but it is still desirable to minimize the total number of registers used in each function.
This code is modeled after lib/CodeGen/StackSlotColoring.cpp.
Definition in file WebAssemblyRegColoring.cpp.
#define DEBUG_TYPE "wasm-reg-coloring" |
Definition at line 30 of file WebAssemblyRegColoring.cpp.
|
static |
Definition at line 66 of file WebAssemblyRegColoring.cpp.
References assert(), C, llvm::dbgs(), llvm::LiveInterval::dump(), llvm::LiveRange::empty(), llvm::MachineFunction::exposesReturnsTwice(), llvm::MachineFunction::getInfo(), llvm::LiveIntervals::getInterval(), llvm::MachineFunction::getName(), llvm::MachineRegisterInfo::getNumVirtRegs(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::LiveIntervals::getSpillWeight(), llvm::TargetRegisterInfo::index2VirtReg(), llvm::MachineRegisterInfo::isLiveIn(), LLVM_DEBUG, MRI, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::LiveInterval::reg, llvm::MachineRegisterInfo::reg_nodbg_operands(), llvm::MachineRegisterInfo::replaceRegWith(), llvm::SmallVectorImpl< T >::reserve(), llvm::SmallVectorBase::size(), llvm::sort(), llvm::MachineRegisterInfo::use_empty(), llvm::TargetRegisterInfo::virtReg2Index(), and llvm::LiveInterval::weight.
INITIALIZE_PASS | ( | WebAssemblyRegColoring | , |
DEBUG_TYPE | , | ||
"Minimize number of registers used" | , | ||
false | , | ||
false | |||
) |
Definition at line 58 of file WebAssemblyRegColoring.cpp.