Precise LoopSafetyInfo based on ImplicitControlFlowTracking.

Synopsis

Declared in <llvm/Analysis/MustExecute.h>

class ICFLoopSafetyInfo
    : public LoopSafetyInfo

Description

This implementation of LoopSafetyInfo use ImplicitControlFlowTracking to give precise answers on "may throw" queries. This implementation uses cache that should be invalidated by calling the methods insertInstructionTo and removeInstruction whenever we modify a basic block's contents by adding or removing instructions.

Base Classes

Name

Description

LoopSafetyInfo

Captures information about whether loop blocks may throw or exit abnormally.

Member Functions

Name

Description

allLoopPathsLeadToBlock

Return true if we must reach the block BB under assumption that the loop CurLoop is entered.

allLoopPathsLeadToBlockImpl

Implementation helper for allLoopPathsLeadToBlock.

anyBlockMayThrow [virtual]

Returns true iff any block of the loop contains an instruction that may throw or otherwise exit abnormally.

blockMayThrow [virtual]

Returns true iff the block BB potentially may throw exception.

computeLoopSafetyInfo [virtual]

Compute safety information for the given loop.

copyColors

Copy colors of block Old into the block New.

doesNotWriteMemoryBefore

doesNotWriteMemoryBefore overloads

getBlockColors

Returns block colors map that is used to update funclet operand bundles.

insertInstructionTo

Update caches for an instruction about to be inserted into a block.

isGuaranteedToExecute [virtual]

Returns true if Inst is guaranteed to execute at least once in the loop.

removeInstruction

Inform safety info that we are planning to remove the instruction Inst from its block. It will make all cache updates to keep it correct after this removal.

Protected Member Functions

Name

Description

computeBlockColors

Computes block colors.

Created with MrDocs