LLVM 24.0.0git
WebAssemblyPeephole.cpp File Reference

Late peephole optimizations for WebAssembly. More...

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "wasm-peephole"

Functions

 INITIALIZE_PASS (WebAssemblyPeepholeLegacy, 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)
static bool peephole (MachineFunction &MF, TargetLibraryInfo &LibInfo, const LibcallLoweringInfo &LibcallLowering)

Variables

static cl::opt< boolDisableWebAssemblyFallthroughReturnOpt ("disable-wasm-fallthrough-return-opt", cl::Hidden, cl::desc("WebAssembly: Disable fallthrough-return optimizations."), cl::init(false))

Detailed Description

Late peephole optimizations for WebAssembly.

Definition in file WebAssemblyPeephole.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "wasm-peephole"

Definition at line 30 of file WebAssemblyPeephole.cpp.

Function Documentation

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( WebAssemblyPeepholeLegacy ,
DEBUG_TYPE ,
"WebAssembly peephole optimizations" ,
false ,
false  )

◆ maybeRewriteToDrop()

◆ maybeRewriteToFallthrough()

◆ peephole()

Variable Documentation

◆ 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