26 if (!
F || !
F->getValueType() || !
F->getValueType()->isFunctionTy())
30 if (
F->getParent()->getTargetTriple().isWindowsArm64EC()) {
33 Name.consume_front(
"#");
60 return "__gnat_eh_personality";
62 return "__gxx_personality_v0";
64 return "__gxx_personality_sj0";
66 return "__gcc_personality_v0";
68 return "__gcc_personality_sj0";
70 return "__objc_personality_v0";
72 return "_except_handler3";
74 return "__C_specific_handler";
76 return "__CxxFrameHandler3";
78 return "ProcessCLRException";
80 return "rust_eh_personality";
82 return "__gxx_wasm_personality_v0";
84 return "__xlcxx_personality_v1";
86 return "__zos_cxx_personality_v2";
109 bool EHa = M->getModuleFlag(
"eh-asynch");
129 dbgs() <<
"\nColoring funclets for " <<
F.getName() <<
"\n");
131 Worklist.
push_back({EntryBlock, EntryBlock});
133 while (!Worklist.
empty()) {
138 dbgs() <<
"Visiting " << Visiting->
getName() <<
", "
139 << Color->getName() <<
"\n");
141 if (VisitingHead->isEHPad()) {
153 dbgs() <<
" Assigned color \'" << Color->getName()
154 <<
"\' to block \'" << Visiting->
getName()
160 Value *ParentPad = CatchRet->getCatchSwitchParentPad();
162 SuccColor = EntryBlock;
This file contains the declarations for the subclasses of Constant, which represent the different fla...
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
Module.h This file contains the declarations for the Module class.
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
#define DEBUG_WITH_TYPE(TYPE,...)
DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.
LLVM Basic Block Representation.
const Function * getParent() const
Return the enclosing method, or null if none.
LLVM_ABI InstListType::const_iterator getFirstNonPHIIt() const
Returns an iterator to the first instruction in this block that is not a PHINode instruction.
InstListType::iterator iterator
Instruction iterators...
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
A Module instance is used to store all the information related to an LLVM module.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
void push_back(EltTy NewVal)
Triple - Helper class for working with autoconf configuration names.
LLVM Value Representation.
LLVM_ABI const Value * stripPointerCasts() const
Strip off pointer casts, all-zero GEPs and address space casts.
LLVM_ABI StringRef getName() const
Return a constant reference to the value's name.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI StringRef getEHPersonalityName(EHPersonality Pers)
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
auto successors(const MachineBasicBlock *BB)
LLVM_ABI DenseMap< BasicBlock *, ColorVector > colorEHFunclets(Function &F)
If an EH funclet personality is in use (see isFuncletEHPersonality), this will recompute which blocks...
LLVM_ABI bool canSimplifyInvokeNoUnwind(const Function *F)
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
LLVM_ABI EHPersonality classifyEHPersonality(const Value *Pers)
See if the given exception handling personality function is one that we understand.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
bool isAsynchronousEHPersonality(EHPersonality Pers)
Returns true if this personality function catches asynchronous exceptions.
TinyPtrVector< BasicBlock * > ColorVector
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
LLVM_ABI EHPersonality getDefaultEHPersonality(const Triple &T)