LLVM  6.0.0svn
Namespaces | 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.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "winehstate"
 

Functions

void llvm::initializeWinEHStatePassPass (PassRegistry &)
 
 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 586 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(), DEBUG, 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::Value::stripPointerCasts(), and llvm::successors().

◆ INITIALIZE_PASS()

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

Definition at line 124 of file X86WinEHState.cpp.

References llvm::Function::addFnAttr(), llvm::CallInst::addParamAttr(), llvm::SmallVectorImpl< T >::append(), llvm::Function::arg_begin(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::BasicBlock::begin(), 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::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::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::Function::hasPersonalityFn(), 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, isPodLike< T >::value >::push_back(), llvm::Value::replaceAllUsesWith(), 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::AnalysisUsage::setPreservesCFG(), llvm::CallInst::setTailCall(), llvm::CallInst::setTailCallKind(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::Constant::stripPointerCasts(), llvm::Value::takeName(), llvm::Unknown, and llvm::CallingConv::X86_StdCall.