LLVM: lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp File Reference (original) (raw)

This file converts any remaining registers into WebAssembly locals. More...

Go to the source code of this file.

Macros
#define DEBUG_TYPE "wasm-explicit-locals"
Functions
INITIALIZE_PASS (WebAssemblyExplicitLocals, DEBUG_TYPE, "Convert registers to WebAssembly locals", false, false) FunctionPass *llvm
static void checkFrameBase (WebAssemblyFunctionInfo &MFI, unsigned Local, unsigned Reg)
static unsigned getLocalId (DenseMap< unsigned, unsigned > &Reg2Local, WebAssemblyFunctionInfo &MFI, unsigned &CurLocal, unsigned Reg)
Return a local id number for the given register, assigning it a new one if it doesn't yet have one.
static unsigned getDropOpcode (const TargetRegisterClass *RC)
Get the appropriate drop opcode for the given register class.
static unsigned getLocalGetOpcode (const TargetRegisterClass *RC)
Get the appropriate local.get opcode for the given register class.
static unsigned getLocalSetOpcode (const TargetRegisterClass *RC)
Get the appropriate local.set opcode for the given register class.
static unsigned getLocalTeeOpcode (const TargetRegisterClass *RC)
Get the appropriate local.tee opcode for the given register class.
static MVT typeForRegClass (const TargetRegisterClass *RC)
Get the type associated with the given register class.
static MachineInstr * findStartOfTree (MachineOperand &MO, MachineRegisterInfo &MRI, const WebAssemblyFunctionInfo &MFI)
Given a MachineOperand of a stackified vreg, return the instruction at the start of the expression tree.
static void removeFakeUses (MachineFunction &MF)

This file converts any remaining registers into WebAssembly locals.

After register stackification and register coloring, convert non-stackified registers into locals, inserting explicit local.get and local.set instructions.

Definition in file WebAssemblyExplicitLocals.cpp.

DEBUG_TYPE

#define DEBUG_TYPE "wasm-explicit-locals"

checkFrameBase()

findStartOfTree()

getDropOpcode()

getLocalGetOpcode()

getLocalId()

getLocalSetOpcode()

getLocalTeeOpcode()

INITIALIZE_PASS()

INITIALIZE_PASS ( WebAssemblyExplicitLocals ,
DEBUG_TYPE ,
"Convert registers to WebAssembly locals" ,
false ,
false )

removeFakeUses()

typeForRegClass()