LLVM
8.0.1
|
Late peephole optimizations for WebAssembly. More...
#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "WebAssembly.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "WebAssemblySubtarget.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "wasm-peephole" |
Functions | |
INITIALIZE_PASS (WebAssemblyPeephole, DEBUG_TYPE, "WebAssembly peephole optimizations", false, false) FunctionPass *llvm | |
static bool | MaybeRewriteToDrop (unsigned OldReg, unsigned NewReg, MachineOperand &MO, WebAssemblyFunctionInfo &MFI, MachineRegisterInfo &MRI) |
If desirable, rewrite NewReg to a drop register. More... | |
static bool | MaybeRewriteToFallthrough (MachineInstr &MI, MachineBasicBlock &MBB, const MachineFunction &MF, WebAssemblyFunctionInfo &MFI, MachineRegisterInfo &MRI, const WebAssemblyInstrInfo &TII, unsigned FallthroughOpc, unsigned CopyLocalOpc) |
Variables | |
static cl::opt< bool > | DisableWebAssemblyFallthroughReturnOpt ("disable-wasm-fallthrough-return-opt", cl::Hidden, cl::desc("WebAssembly: Disable fallthrough-return optimizations."), cl::init(false)) |
Late peephole optimizations for WebAssembly.
Definition in file WebAssemblyPeephole.cpp.
#define DEBUG_TYPE "wasm-peephole" |
Definition at line 25 of file WebAssemblyPeephole.cpp.
INITIALIZE_PASS | ( | WebAssemblyPeephole | , |
DEBUG_TYPE | , | ||
"WebAssembly peephole optimizations" | , | ||
false | , | ||
false | |||
) |
Definition at line 53 of file WebAssemblyPeephole.cpp.
|
static |
If desirable, rewrite NewReg to a drop register.
Definition at line 61 of file WebAssemblyPeephole.cpp.
References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineOperand::setIsDead(), llvm::MachineOperand::setReg(), and llvm::WebAssemblyFunctionInfo::stackifyVReg().
|
static |
Definition at line 75 of file WebAssemblyPeephole.cpp.
References llvm::MachineFunction::back(), and DisableWebAssemblyFallthroughReturnOpt.