LLVM  8.0.1
Macros | Functions
WebAssemblyLateEHPrepare.cpp File Reference

Does various transformations for exception handling. More...

#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "WebAssembly.h"
#include "WebAssemblySubtarget.h"
#include "WebAssemblyUtilities.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/WasmEHFuncInfo.h"
#include "llvm/MC/MCAsmInfo.h"
Include dependency graph for WebAssemblyLateEHPrepare.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "wasm-exception-prepare"
 

Functions

 INITIALIZE_PASS (WebAssemblyLateEHPrepare, DEBUG_TYPE, "WebAssembly Late Exception Preparation", false, false) FunctionPass *llvm
 
static MachineBasicBlockgetMatchingEHPad (MachineInstr *MI)
 
template<typename Container >
static void eraseDeadBBsAndChildren (const Container &MBBs)
 

Detailed Description

Does various transformations for exception handling.

Definition in file WebAssemblyLateEHPrepare.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "wasm-exception-prepare"

Definition at line 24 of file WebAssemblyLateEHPrepare.cpp.

Function Documentation

◆ eraseDeadBBsAndChildren()

template<typename Container >
static void eraseDeadBBsAndChildren ( const Container &  MBBs)
static

Definition at line 90 of file WebAssemblyLateEHPrepare.cpp.

References llvm::SmallVectorImpl< T >::append(), assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::MachineBasicBlock::begin(), llvm::ISD::BR, llvm::BuildMI(), llvm::Catch, llvm::ISD::CATCHRET, llvm::WebAssembly::ClangCallTerminateFn, llvm::ISD::CLEANUPRET, llvm::WebAssembly::CxaRethrowFn, llvm::dbgs(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::erase(), llvm::MachineBasicBlock::eraseFromParent(), llvm::MachineInstr::eraseFromParent(), llvm::SmallVectorTemplateCommon< T >::front(), llvm::MachineInstr::getDebugLoc(), llvm::MCAsmInfo::getExceptionHandlingType(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getGlobal(), getMatchingEHPad(), llvm::MachineOperand::getMBB(), llvm::TargetMachine::getMCAsmInfo(), llvm::Value::getName(), llvm::MachineFunction::getName(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), llvm::MachineFunction::getWasmEHFuncInfo(), llvm::Function::hasPersonalityFn(), llvm::MachineBasicBlock::insert(), llvm::WebAssembly::isCatch(), llvm::WebAssembly::isCatchTerminatePad(), llvm::MachineOperand::isGlobal(), llvm::WebAssembly::isThrow(), LLVM_DEBUG, llvm::make_range(), MI, llvm::MachineBasicBlock::pred_empty(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::MachineBasicBlock::removeSuccessor(), llvm::WebAssembly::StdTerminateFn, llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_end(), TII, and llvm::Wasm.

◆ getMatchingEHPad()

static MachineBasicBlock* getMatchingEHPad ( MachineInstr MI)
static

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( WebAssemblyLateEHPrepare  ,
DEBUG_TYPE  ,
"WebAssembly Late Exception Preparation"  ,
false  ,
false   
)

Definition at line 50 of file WebAssemblyLateEHPrepare.cpp.