LLVM  6.0.0svn
Macros | Functions | Variables
WebAssemblyPeephole.cpp File Reference

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"
Include dependency graph for WebAssemblyPeephole.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "wasm-peephole"
 

Functions

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< 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 25 of file WebAssemblyPeephole.cpp.

Function Documentation

◆ MaybeRewriteToDrop()

static bool MaybeRewriteToDrop ( unsigned  OldReg,
unsigned  NewReg,
MachineOperand MO,
WebAssemblyFunctionInfo MFI,
MachineRegisterInfo MRI 
)
static

◆ MaybeRewriteToFallthrough()

static bool MaybeRewriteToFallthrough ( MachineInstr MI,
MachineBasicBlock MBB,
const MachineFunction MF,
WebAssemblyFunctionInfo MFI,
MachineRegisterInfo MRI,
const WebAssemblyInstrInfo TII,
unsigned  FallthroughOpc,
unsigned  CopyLocalOpc 
)
static

Variable Documentation

◆ DisableWebAssemblyFallthroughReturnOpt

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