LLVM  8.0.1
Macros | Functions
X86WinEHState.cpp File Reference
#include "X86.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/EHPersonalities.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/WinEHFuncInfo.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include <deque>
Include dependency graph for X86WinEHState.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "winehstate"
 

Functions

 INITIALIZE_PASS (WinEHStatePass, "x86-winehstate", "Insert stores for EH state numbers", false, false) bool WinEHStatePass
 
static int getPredState (DenseMap< BasicBlock *, int > &FinalStates, Function &F, int ParentBaseState, BasicBlock *BB)
 
static int getSuccState (DenseMap< BasicBlock *, int > &InitialStates, Function &F, int ParentBaseState, BasicBlock *BB)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "winehstate"

Definition at line 35 of file X86WinEHState.cpp.

Function Documentation

◆ getPredState()

static int getPredState ( DenseMap< BasicBlock *, int > &  FinalStates,
Function F,
int  ParentBaseState,
BasicBlock BB 
)
static

◆ getSuccState()

static int getSuccState ( DenseMap< BasicBlock *, int > &  InitialStates,
Function F,
int  ParentBaseState,
BasicBlock BB 
)
static

Definition at line 590 of file X86WinEHState.cpp.

References assert(), llvm::calculateSEHStateNumbers(), llvm::calculateWinCXXEHStateNumbers(), llvm::colorEHFunclets(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::IRBuilder< T, Inserter >::CreateCall(), llvm::IRBuilder< T, Inserter >::CreateLoad(), llvm::IRBuilder< T, Inserter >::CreateStore(), llvm::IRBuilder< T, Inserter >::CreateStructGEP(), llvm::dbgs(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotAccessMemory(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotThrow(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::BasicBlock::front(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledValue(), llvm::Intrinsic::getDeclaration(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getFirstNonPHI(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::IRBuilderBase::getInt32(), llvm::IRBuilderBase::getInt8PtrTy(), llvm::Value::getName(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getParent(), getPredState(), llvm::BasicBlock::getTerminator(), I, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::isAsynchronousEHPersonality(), LLVM_DEBUG, llvm::Value::stripPointerCasts(), llvm::successors(), llvm::Intrinsic::x86_seh_ehguard, and llvm::Intrinsic::x86_seh_ehregnode.

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( WinEHStatePass  ,
"x86-winehstate"  ,
"Insert stores for EH state numbers"  ,
false  ,
false   
)

Definition at line 120 of file X86WinEHState.cpp.

References llvm::Function::addFnAttr(), llvm::CallBase::addParamAttr(), llvm::SmallVectorImpl< T >::append(), llvm::Function::arg_begin(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::BasicBlock::begin(), C, llvm::classifyEHPersonality(), Context, llvm::BasicBlock::Create(), llvm::Function::Create(), llvm::StructType::create(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::IRBuilder< T, Inserter >::CreateCall(), llvm::IRBuilder< T, Inserter >::CreateInvoke(), llvm::IRBuilder< T, Inserter >::CreateLoad(), llvm::IRBuilder< T, Inserter >::CreateRet(), llvm::IRBuilder< T, Inserter >::CreateStore(), llvm::IRBuilder< T, Inserter >::CreateStructGEP(), llvm::GlobalValue::dropLLVMManglingEscape(), llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::Instruction::eraseFromParent(), F(), llvm::Intrinsic::frameaddress, llvm::BasicBlock::front(), llvm::WinEHFuncInfo::FuncletBaseStateMap, GEP, llvm::FunctionType::get(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getArgOperand(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getAttributes(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCallingConv(), llvm::GlobalObject::getComdat(), llvm::Function::getContext(), llvm::Intrinsic::getDeclaration(), llvm::Function::getEntryBlock(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::IRBuilderBase::getInt32(), llvm::Type::getInt32Ty(), llvm::IRBuilderBase::getInt8PtrTy(), llvm::Type::getInt8PtrTy(), llvm::Value::getName(), llvm::Constant::getNullValue(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getNumArgOperands(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getOperandBundlesAsDefs(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getParent(), llvm::Function::getPersonalityFn(), llvm::Type::getPointerTo(), llvm::Type::getVoidTy(), llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::Function::hasPersonalityFn(), llvm::Attribute::InReg, llvm::IRBuilder< T, Inserter >::Insert(), Int32Ty, llvm::GlobalValue::InternalLinkage, llvm::WinEHFuncInfo::InvokeStateMap, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::isCall(), llvm::isFuncletEHPersonality(), llvm::codeview::Link, llvm_unreachable, llvm::makeArrayRef(), llvm::MSVC_CXX, llvm::MSVC_X86SEH, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::Value::replaceAllUsesWith(), runOnFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::setAttributes(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::setCallingConv(), llvm::GlobalObject::setComdat(), llvm::AnalysisUsage::setPreservesCFG(), llvm::CallInst::setTailCall(), llvm::CallInst::setTailCallKind(), llvm::SmallVectorBase::size(), llvm::Intrinsic::stacksave, llvm::Constant::stripPointerCasts(), llvm::Value::takeName(), llvm::Unknown, llvm::Intrinsic::x86_seh_lsda, and llvm::CallingConv::X86_StdCall.