LLVM: lib/Transforms/Scalar/MakeGuardsExplicit.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

41

42using namespace llvm;

43

45

47 (void)OriginalBB;

50

52}

53

55

56

58 F.getParent(), Intrinsic::experimental_guard);

59 if (!GuardDecl || GuardDecl->use_empty())

60 return false;

61

66

67 if (GuardIntrinsics.empty())

68 return false;

69

71 F.getParent(), Intrinsic::experimental_deoptimize, {F.getReturnType()});

72 DeoptIntrinsic->setCallingConv(GuardDecl->getCallingConv());

73

74 for (auto *Guard : GuardIntrinsics)

76

77 return true;

78}

79

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

Expand Atomic instructions

static void turnToExplicitForm(CallInst *Guard, Function *DeoptIntrinsic)

Definition MakeGuardsExplicit.cpp:44

static bool explicifyGuards(Function &F)

Definition MakeGuardsExplicit.cpp:54

LLVM Basic Block Representation.

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.

LLVM_ABI InstListType::iterator eraseFromParent()

This method unlinks 'this' from the containing basic block and deletes it.

A set of analyses that are preserved following a run of a transformation pass.

static PreservedAnalyses none()

Convenience factory function for the empty preserved set.

static PreservedAnalyses all()

Construct a special preserved set that preserves all passes.

void push_back(const T &Elt)

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

const ParentTy * getParent() const

LLVM_ABI Function * getOrInsertDeclaration(Module *M, ID id, ArrayRef< Type * > Tys={})

Look up the Function declaration of the intrinsic id in the Module M.

LLVM_ABI Function * getDeclarationIfExists(const Module *M, ID id)

Look up the Function declaration of the intrinsic id in the Module M and return it if it exists.

This is an optimization pass for GlobalISel generic memory operations.

void makeGuardControlFlowExplicit(Function *DeoptIntrinsic, CallInst *Guard, bool UseWC)

Splits control flow at point of Guard, replacing it with explicit branch by the condition of guard's ...

bool isGuard(const User *U)

Returns true iff U has semantics of a guard expressed in a form of call of llvm.experimental....

bool isWidenableBranch(const User *U)

Returns true iff U is a widenable branch (that is, extractWidenableCondition returns widenable condit...

decltype(auto) cast(const From &Val)

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

AnalysisManager< Function > FunctionAnalysisManager

Convenience typedef for the Function analysis manager.

PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)

Definition MakeGuardsExplicit.cpp:80