|
LLVM
3.7.0
|
#include "llvm/CodeGen/Passes.h"#include "llvm/ADT/MapVector.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/Triple.h"#include "llvm/ADT/TinyPtrVector.h"#include "llvm/Analysis/LibCallSemantics.h"#include "llvm/Analysis/TargetLibraryInfo.h"#include "llvm/CodeGen/WinEHFuncInfo.h"#include "llvm/IR/Dominators.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/IR/PatternMatch.h"#include "llvm/Pass.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/Cloning.h"#include "llvm/Transforms/Utils/Local.h"#include "llvm/Transforms/Utils/PromoteMemToReg.h"#include <memory>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "winehprepare" |
Functions | |
| INITIALIZE_TM_PASS (WinEHPrepare,"winehprepare","Prepare Windows exceptions", false, false) FunctionPass *llvm | |
| static bool | isSelectorDispatch (BasicBlock *BB, BasicBlock *&CatchHandler, Constant *&Selector, BasicBlock *&NextBB) |
| static void | findReachableBlocks (SmallPtrSetImpl< BasicBlock * > &ReachableBBs, SetVector< BasicBlock * > &Worklist, const SetVector< BasicBlock * > *StopPoints) |
| static Instruction * | findBeginCatchSplitPoint (BasicBlock *BB, IntrinsicInst *II) |
| static bool | isCatchAllLandingPad (const BasicBlock *BB) |
| static bool | isCatchBlock (BasicBlock *BB) |
| static BasicBlock * | createStubLandingPad (Function *Handler) |
| static bool | isLocalAddressCall (const Value *V) |
| static void | createCleanupHandler (LandingPadActions &Actions, CleanupHandlerMapTy &CleanupHandlerMap, BasicBlock *BB) |
| static CallSite | matchOutlinedFinallyCall (BasicBlock *BB, Instruction *MaybeCall) |
| static BasicBlock * | followSingleUnconditionalBranches (BasicBlock *BB) |
| static void | print_name (const Value *V) |
| #define DEBUG_TYPE "winehprepare" |
Definition at line 48 of file WinEHPrepare.cpp.
|
static |
Definition at line 2244 of file WinEHPrepare.cpp.
References llvm::dbgs(), DEBUG, llvm::Value::getName(), and llvm::ActionHandler::getStartBlock().
|
static |
Definition at line 1290 of file WinEHPrepare.cpp.
References llvm::BasicBlock::Create(), llvm::IRBuilder< preserveNames, T, Inserter >::CreateCall(), llvm::IRBuilder< preserveNames, T, Inserter >::CreateLandingPad(), llvm::IRBuilder< preserveNames, T, Inserter >::CreateUnreachable(), llvm::StructType::get(), llvm::Function::getBasicBlockList(), llvm::Function::getContext(), llvm::Intrinsic::getDeclaration(), llvm::Type::getInt32Ty(), llvm::Type::getInt8PtrTy(), llvm::GlobalValue::getParent(), llvm::iplist< NodeTy, Traits >::push_back(), and llvm::LandingPadInst::setCleanup().
|
static |
Definition at line 436 of file WinEHPrepare.cpp.
References llvm::dyn_cast(), llvm::BasicBlock::getFirstNonPHI(), llvm::User::getOperand(), llvm::ilist_node< NodeTy >::getPrevNode(), and I.
|
static |
Definition at line 408 of file WinEHPrepare.cpp.
References llvm::SetVector< T, Vector, Set >::count(), llvm::SetVector< T, Vector, Set >::empty(), llvm::BasicBlock::getTerminator(), llvm::SetVector< T, Vector, Set >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SetVector< T, Vector, Set >::pop_back_val(), llvm::succ_begin(), and llvm::succ_end().
|
static |
Definition at line 2271 of file WinEHPrepare.cpp.
References llvm::dyn_cast(), llvm::BasicBlock::getFirstNonPHIOrDbg(), and llvm::BasicBlock::getTerminator().
| INITIALIZE_TM_PASS | ( | WinEHPrepare | , |
| "winehprepare" | , | ||
| "Prepare Windows exceptions" | , | ||
| false | , | ||
| false | |||
| ) |
Definition at line 356 of file WinEHPrepare.cpp.
|
static |
Definition at line 507 of file WinEHPrepare.cpp.
References llvm::LandingPadInst::getClause(), llvm::BasicBlock::getLandingPadInst(), llvm::LandingPadInst::getNumClauses(), llvm::LandingPadInst::isCatch(), and N.
|
static |
Definition at line 1281 of file WinEHPrepare.cpp.
References llvm::BasicBlock::end(), llvm::BasicBlock::getFirstNonPHIOrDbg(), llvm::ARM_PROC::IE, and llvm::PatternMatch::match().
Definition at line 1620 of file WinEHPrepare.cpp.
References llvm::PatternMatch::match().
Referenced by matchOutlinedFinallyCall().
|
static |
Definition at line 1251 of file WinEHPrepare.cpp.
References llvm::BasicBlock::getTerminator(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::PatternMatch::m_Br(), llvm::PatternMatch::m_Constant(), llvm::PatternMatch::m_ICmp(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
|
static |
Definition at line 2254 of file WinEHPrepare.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_size(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getArgument(), llvm::ilist_node< NodeTy >::getNextNode(), llvm::BasicBlock::getTerminator(), isLocalAddressCall(), llvm::PatternMatch::m_SpecificInt(), and llvm::PatternMatch::match().
Definition at line 2629 of file WinEHPrepare.cpp.
References llvm::dbgs(), DEBUG, llvm::Value::dump(), and llvm::Value::getName().
1.8.6