llvm::MustBeExecutedContextExplorer

Interface to explore must-be-executed contexts around program points.

Synopsis

Declared in <llvm/Analysis/MustExecute.h>

struct MustBeExecutedContextExplorer;

Description

A "must be executed context" for a given program point PP is the set of instructions, potentially before and after PP, that are executed always when PP is reached. The MustBeExecutedContextExplorer an interface to explore "must be executed contexts" in a module through the use of MustBeExecutedIterator.

The explorer exposes "must be executed iterators" that traverse the must be executed context. There is little information sharing between iterators as the expected use case involves few iterators for "far apart" instructions. If that changes, we should consider caching more intermediate results.

Type Aliases

NameDescription
const_iterator Const iterator over a must-be-executed context.
iterator Iterator-based interface.

Member Functions

NameDescription
MustBeExecutedContextExplorer [constructor]Construct an explorer with the given exploration options and analysis getters.
begin begin overloads
checkForAllContext Check Pred on all instructions in the context.
end end overloads
findBackwardJoinPoint Find the next join point from InitBB in backward direction.
findForwardJoinPoint Find the next join point from InitBB in forward direction.
findInContextOf findInContextOf overloads
getMustBeExecutedNextInstruction Return the next instruction that is guaranteed to be executed after PP.
getMustBeExecutedPrevInstruction Return the previous instr. that is guaranteed to be executed before PP.
range range overloads

Data Members

NameDescription
ExploreCFGBackward True if instructions before the program point in the CFG are explored.
ExploreCFGForward True if instructions after the program point in the CFG are explored.
ExploreInterBlock True if exploration may leave the parent block of the program point.