LLVM 17.0.0git
|
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/WinEHFuncInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/EHPersonalities.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Verifier.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
Go to the source code of this file.
Classes | |
struct | WorkItem |
Macros | |
#define | DEBUG_TYPE "winehprepare" |
Variables | |
static cl::opt< bool > | DisableDemotion ("disable-demotion", cl::Hidden, cl::desc("Clone multicolor basic blocks but do not demote cross scopes"), cl::init(false)) |
static cl::opt< bool > | DisableCleanups ("disable-cleanups", cl::Hidden, cl::desc("Do not remove implausible terminators or other similar cleanups"), cl::init(false)) |
static cl::opt< bool > | DemoteCatchSwitchPHIOnlyOpt ("demote-catchswitch-only", cl::Hidden, cl::desc("Demote catchswitch BBs only (for wasm EH)"), cl::init(false)) |
#define DEBUG_TYPE "winehprepare" |
Definition at line 41 of file WinEHPrepare.cpp.
|
static |
Definition at line 622 of file WinEHPrepare.cpp.
Referenced by llvm::calculateClrEHStateNumbers().
|
static |
Definition at line 458 of file WinEHPrepare.cpp.
References llvm::Filter, and llvm::BasicBlock::size().
Referenced by calculateSEHStateNumbers().
|
static |
Definition at line 469 of file WinEHPrepare.cpp.
References llvm::BasicBlock::size().
Referenced by calculateSEHStateNumbers().
|
static |
Definition at line 141 of file WinEHPrepare.cpp.
References llvm::WinEHHandlerType::Adjectives, llvm::WinEHHandlerType::Alloca, assert(), llvm::WinEHTryBlockMapEntry::CatchHigh, llvm::WinEHHandlerType::CatchObj, llvm::WinEHHandlerType::Handler, llvm::WinEHTryBlockMapEntry::HandlerArray, llvm::Constant::isNullValue(), llvm::Constant::stripPointerCasts(), llvm::WinEHTryBlockMapEntry::TryHigh, llvm::WinEHTryBlockMapEntry::TryLow, and llvm::WinEHHandlerType::TypeDescriptor.
Referenced by calculateCXXStateNumbers().
|
static |
Definition at line 132 of file WinEHPrepare.cpp.
References llvm::CxxUnwindMapEntry::Cleanup, and llvm::CxxUnwindMapEntry::ToState.
Referenced by calculateCXXStateNumbers().
|
static |
Definition at line 362 of file WinEHPrepare.cpp.
References addTryBlockMapEntry(), addUnwindMapEntry(), assert(), calculateCXXStateNumbers(), llvm::dbgs(), getCleanupRetUnwindDest(), getEHPadFromPredecessor(), llvm::Value::getName(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::Module::getTargetTriple(), llvm::Triple::isArch64Bit(), llvm::BasicBlock::isEHPad(), LLVM_DEBUG, Mod, llvm::predecessors(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::report_fatal_error().
Referenced by calculateCXXStateNumbers(), and llvm::calculateWinCXXEHStateNumbers().
|
static |
Definition at line 483 of file WinEHPrepare.cpp.
References addSEHExcept(), addSEHFinally(), assert(), calculateSEHStateNumbers(), llvm::dbgs(), llvm::Filter, getCleanupRetUnwindDest(), getEHPadFromPredecessor(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), llvm::BasicBlock::isEHPad(), llvm::Constant::isNullValue(), LLVM_DEBUG, llvm::predecessors(), and llvm::report_fatal_error().
Referenced by llvm::calculateSEHStateNumbers(), and calculateSEHStateNumbers().
|
static |
Definition at line 175 of file WinEHPrepare.cpp.
References assert(), llvm::colorEHFunclets(), F, llvm::BasicBlock::front(), getCleanupRetUnwindDest(), llvm::Function::getEntryBlock(), llvm::BasicBlock::getFirstNonPHI(), and llvm_unreachable.
Referenced by llvm::calculateClrEHStateNumbers(), llvm::calculateSEHStateNumbers(), and llvm::calculateWinCXXEHStateNumbers().
|
static |
Definition at line 168 of file WinEHPrepare.cpp.
References llvm::Value::users().
Referenced by calculateCXXStateNumbers(), calculateSEHStateNumbers(), calculateStateNumbersForInvokes(), and isTopLevelPadForMSVC().
|
static |
Definition at line 342 of file WinEHPrepare.cpp.
References assert(), llvm::BasicBlock::getTerminator(), and llvm::Instruction::isEHPad().
Referenced by calculateCXXStateNumbers(), and calculateSEHStateNumbers().
INITIALIZE_PASS | ( | WinEHPrepare | , |
DEBUG_TYPE | , | ||
"Prepare Windows exceptions" | , | ||
false | , | ||
false | |||
) |
Definition at line 106 of file WinEHPrepare.cpp.
|
static |
Definition at line 562 of file WinEHPrepare.cpp.
References getCleanupRetUnwindDest(), and llvm_unreachable.
Referenced by llvm::calculateSEHStateNumbers(), and llvm::calculateWinCXXEHStateNumbers().
|
static |
|
static |