LLVM  6.0.0svn
Macros | Functions
WebAssemblyCallIndirectFixup.cpp File Reference

This file converts pseudo call_indirect instructions into real call_indirects. More...

#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "WebAssembly.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "WebAssemblySubtarget.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for WebAssemblyCallIndirectFixup.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "wasm-call-indirect-fixup"
 

Functions

static unsigned GetNonPseudoCallIndirectOpcode (const MachineInstr &MI)
 
static bool IsPseudoCallIndirect (const MachineInstr &MI)
 

Detailed Description

This file converts pseudo call_indirect instructions into real call_indirects.

The order of arguments for a call_indirect is the arguments to the function call, followed by the function pointer. There's no natural way to express a machineinstr with varargs followed by one more arg, so we express it as the function pointer followed by varargs, then rewrite it here.

We need to rewrite the order of the arguments on the machineinstrs themselves so that register stackification knows the order they'll be executed in.

Definition in file WebAssemblyCallIndirectFixup.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "wasm-call-indirect-fixup"

Definition at line 40 of file WebAssemblyCallIndirectFixup.cpp.

Function Documentation

◆ GetNonPseudoCallIndirectOpcode()

static unsigned GetNonPseudoCallIndirectOpcode ( const MachineInstr MI)
static

Definition at line 61 of file WebAssemblyCallIndirectFixup.cpp.

References llvm::MachineInstr::getOpcode().

Referenced by IsPseudoCallIndirect().

◆ IsPseudoCallIndirect()

static bool IsPseudoCallIndirect ( const MachineInstr MI)
static