LLVM: lib/Target/WebAssembly/WebAssemblyPeephole.cpp File Reference (original) (raw)
Late peephole optimizations for WebAssembly. More...
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. | |
| static bool | maybeRewriteToFallthrough (MachineInstr &MI, MachineBasicBlock &MBB, const MachineFunction &MF, WebAssemblyFunctionInfo &MFI, MachineRegisterInfo &MRI, const WebAssemblyInstrInfo &TII) |
| 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.
◆ DEBUG_TYPE
#define DEBUG_TYPE "wasm-peephole"
◆ INITIALIZE_PASS()
| INITIALIZE_PASS | ( | WebAssemblyPeephole | , |
|---|---|---|---|
| DEBUG_TYPE | , | ||
| "WebAssembly peephole optimizations" | , | ||
| false | , | ||
| false | ) |
◆ maybeRewriteToDrop()
◆ maybeRewriteToFallthrough()
Definition at line 75 of file WebAssemblyPeephole.cpp.
References llvm::MachineInstrBuilder::addReg(), assert(), llvm::MachineFunction::back(), llvm::BuildMI(), DisableWebAssemblyFallthroughReturnOpt, llvm::WebAssembly::getCopyOpcodeForRegClass(), llvm::WebAssemblyFunctionInfo::isVRegStackified(), MBB, MI, MRI, Reg, llvm::WebAssemblyFunctionInfo::stackifyVReg(), and TII.
◆ DisableWebAssemblyFallthroughReturnOpt
| cl::opt< bool > DisableWebAssemblyFallthroughReturnOpt("disable-wasm-fallthrough-return-opt", cl::Hidden, cl::desc("WebAssembly: Disable fallthrough-return optimizations."), cl::init(false)) ( "disable-wasm-fallthrough-return-opt" , cl::Hidden , cl::desc("WebAssembly: Disable fallthrough-return optimizations.") , cl::init(false) ) | static |
|---|