56 return "__C_specific_handler";
62 return "__xlcxx_personality_v1";
97 <<
F.getName() <<
"\n");
99 Worklist.
push_back({EntryBlock, EntryBlock});
101 while (!Worklist.
empty()) {
106 dbgs() <<
"Visiting " << Visiting->
getName() <<
", " 107 <<
Color->getName() <<
"\n");
109 if (VisitingHead->isEHPad()) {
121 dbgs() <<
" Assigned color \'" <<
Color->getName()
122 <<
"\' to block \'" << Visiting->
getName()
127 if (
auto *CatchRet = dyn_cast<CatchReturnInst>(
Terminator)) {
128 Value *ParentPad = CatchRet->getCatchSwitchParentPad();
129 if (isa<ConstantTokenNone>(ParentPad))
130 SuccColor = EntryBlock;
132 SuccColor = cast<Instruction>(ParentPad)->
getParent();
This class represents lattice values for constants.
LLVM_NODISCARD bool empty() const
void push_back(const T &Elt)
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...
TinyPtrVector - This class is specialized for cases where there are normally 0 or 1 element in a vect...
StringSwitch & Case(StringLiteral S, T Value)
#define DEBUG_WITH_TYPE(TYPE, X)
DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.
LLVM_NODISCARD R Default(T Value)
bool canSimplifyInvokeNoUnwind(const Function *F)
A switch()-like statement whose cases are string literals.
const Instruction * getFirstNonPHI() const
Returns a pointer to the first instruction in this block that is not a PHINode instruction.
LLVM Basic Block Representation.
void push_back(EltTy NewVal)
This file contains the declarations for the subclasses of Constant, which represent the different fla...
EHPersonality classifyEHPersonality(const Value *Pers)
See if the given exception handling personality function is one that we understand.
EHPersonality getDefaultEHPersonality(const Triple &T)
const Value * stripPointerCasts() const
Strip off pointer casts, all-zero GEPs and address space casts.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Triple - Helper class for working with autoconf configuration names.
Color
A "color", which is either even or odd.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
LLVM_NODISCARD T pop_back_val()
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
StringRef getName() const
Return a constant reference to the value's name.
const Function * getParent() const
Return the enclosing method, or null if none.
StringRef getEHPersonalityName(EHPersonality Pers)
bool isAsynchronousEHPersonality(EHPersonality Pers)
Returns true if this personality function catches asynchronous exceptions.
LLVM Value Representation.
succ_range successors(Instruction *I)
StringRef - Represent a constant reference to a string, i.e.
DenseMap< BasicBlock *, ColorVector > colorEHFunclets(Function &F)
If an EH funclet personality is in use (see isFuncletEHPersonality), this will recompute which blocks...
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.