LLVM: lib/Transforms/Utils/EscapeEnumerator.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

19

20using namespace llvm;

21

24 Triple T(M->getTargetTriple());

28}

29

31 if (Done)

32 return nullptr;

33

34

35 while (StateBB != StateE) {

37

38

39

42 continue;

43

45 TI = CI;

46 Builder.SetInsertPoint(TI);

47 return &Builder;

48 }

49

50 Done = true;

51

52 if (!HandleExceptions)

53 return nullptr;

54

55 if (F.doesNotThrow())

56 return nullptr;

57

58

59

64 if (!CI->doesNotThrow() && !CI->isMustTailCall())

66

67 if (Calls.empty())

68 return nullptr;

69

70

74 if (!F.hasPersonalityFn()) {

77 }

78

81 }

82

87

88

89

90 for (unsigned I = Calls.size(); I != 0;) {

93 }

94

95 Builder.SetInsertPoint(RI);

96 return &Builder;

97}

static FunctionCallee getDefaultPersonalityFn(Module *M)

Definition EscapeEnumerator.cpp:22

Module.h This file contains the declarations for the Module class.

uint64_t IntrinsicInst * II

LLVM Basic Block Representation.

static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)

Creates a new BasicBlock.

LLVM_ABI const CallInst * getTerminatingMustTailCall() const

Returns the call instruction marked 'musttail' prior to the terminating return instruction of this ba...

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...

This class represents a function call, abstracting a target machine's calling convention.

IRBuilder * Next()

Definition EscapeEnumerator.cpp:30

A handy container for a FunctionType+Callee-pointer pair, which can be passed around as a single enti...

static LLVM_ABI FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)

This static method is the primary way of constructing a FunctionType.

This provides a uniform API for creating instructions and inserting them into a basic block: either a...

This is an important class for using LLVM in a threaded context.

The landingpad instruction holds all of the information necessary to generate correct exception handl...

static LLVM_ABI LandingPadInst * Create(Type *RetTy, unsigned NumReservedClauses, const Twine &NameStr="", InsertPosition InsertBefore=nullptr)

Constructors - NumReservedClauses is a hint for the number of incoming clauses that this landingpad w...

void setCleanup(bool V)

Indicate that this landingpad instruction is a cleanup.

A Module instance is used to store all the information related to an LLVM module.

static PointerType * getUnqual(Type *ElementType)

This constructs a pointer to an object of the specified type in the default address space (address sp...

Resume the propagation of an exception.

static ResumeInst * Create(Value *Exn, InsertPosition InsertBefore=nullptr)

void push_back(const T &Elt)

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

static LLVM_ABI StructType * get(LLVMContext &Context, ArrayRef< Type * > Elements, bool isPacked=false)

This static method is the primary way to create a literal StructType.

Triple - Helper class for working with autoconf configuration names.

The instances of the Type class are immutable: once they are created, they are never changed.

static LLVM_ABI IntegerType * getInt32Ty(LLVMContext &C)

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI StringRef getEHPersonalityName(EHPersonality Pers)

LLVM_ABI BasicBlock * changeToInvokeAndSplitBasicBlock(CallInst *CI, BasicBlock *UnwindEdge, DomTreeUpdater *DTU=nullptr)

Convert the CallInst to InvokeInst with the specified unwind edge basic block.

decltype(auto) dyn_cast(const From &Val)

dyn_cast - Return the argument parameter cast to the specified type.

bool isScopedEHPersonality(EHPersonality Pers)

Returns true if this personality uses scope-style EH IR instructions: catchswitch,...

LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)

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 - Return true if the parameter to the template is an instance of one of the template type argu...

decltype(auto) cast(const From &Val)

cast - Return the argument parameter cast to the specified type.

LLVM_ABI EHPersonality getDefaultEHPersonality(const Triple &T)