Go to the documentation of this file.
25 if (!
F || !
F->getValueType() || !
F->getValueType()->isFunctionTy())
57 return "__C_specific_handler";
63 return "__xlcxx_personality_v1";
101 <<
F.getName() <<
"\n");
103 Worklist.push_back({EntryBlock, EntryBlock});
105 while (!Worklist.empty()) {
110 dbgs() <<
"Visiting " << Visiting->
getName() <<
", "
111 << Color->getName() <<
"\n");
125 dbgs() <<
" Assigned color \'" << Color->getName()
126 <<
"\' to block \'" << Visiting->
getName()
131 if (
auto *CatchRet = dyn_cast<CatchReturnInst>(
Terminator)) {
132 Value *ParentPad = CatchRet->getCatchSwitchParentPad();
133 if (isa<ConstantTokenNone>(ParentPad))
134 SuccColor = EntryBlock;
136 SuccColor = cast<Instruction>(ParentPad)->
getParent();
140 Worklist.push_back({Succ, SuccColor});
StringSwitch & Case(StringLiteral S, T Value)
bool isAsynchronousEHPersonality(EHPersonality Pers)
Returns true if this personality function catches asynchronous exceptions.
This is an optimization pass for GlobalISel generic memory operations.
const Function * getParent() const
Return the enclosing method, or null if none.
LLVM_NODISCARD R Default(T Value)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Triple - Helper class for working with autoconf configuration names.
auto successors(MachineBasicBlock *BB)
LLVM_NODISCARD T pop_back_val()
LLVM Basic Block Representation.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
EHPersonality classifyEHPersonality(const Value *Pers)
See if the given exception handling personality function is one that we understand.
#define DEBUG_WITH_TYPE(TYPE, X)
DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.
void push_back(EltTy NewVal)
const Instruction * getFirstNonPHI() const
Returns a pointer to the first instruction in this block that is not a PHINode instruction.
DenseMap< BasicBlock *, ColorVector > colorEHFunclets(Function &F)
If an EH funclet personality is in use (see isFuncletEHPersonality), this will recompute which blocks...
bool canSimplifyInvokeNoUnwind(const Function *F)
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
StringRef getEHPersonalityName(EHPersonality Pers)
StringRef - Represent a constant reference to a string, i.e.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
EHPersonality getDefaultEHPersonality(const Triple &T)
StringRef getName() const
Return a constant reference to the value's name.
const Value * stripPointerCasts() const
Strip off pointer casts, all-zero GEPs and address space casts.
bool isEHPad() const
Return true if the instruction is a variety of EH-block.
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 switch()-like statement whose cases are string literals.
TinyPtrVector - This class is specialized for cases where there are normally 0 or 1 element in a vect...
LLVM Value Representation.