Captures information about whether loop blocks may throw or exit abnormally.
Declared in <llvm/Analysis/MustExecute.h>
class LoopSafetyInfo;
It keep information for loop blocks may throw exception or otherwise exit abnormally on any iteration of the loop which might actually execute at runtime. The primary way to consume this information is via isGuaranteedToExecute below, but some callers bailout or fallback to alternate reasoning if a loop contains any implicit control flow. NOTE: LoopSafetyInfo contains cached information regarding loops and their particular blocks. This information is only dropped on invocation of computeLoopSafetyInfo. If the loop or any of its block is deleted, or if any thrower instructions have been added or removed from them, or if the control flow has changed, or in case of other meaningful modifications, the LoopSafetyInfo needs to be recomputed. If a meaningful modifications to the loop were made and the info wasn't recomputed properly, the behavior of all methods except for computeLoopSafetyInfo is undefined.
| Name | Description |
|---|---|
LoopSafetyInfo [constructor] | Construct an empty loop safety info. |
~LoopSafetyInfo [destructor] [virtual] | Destroy the loop safety info. |
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 for which this info is contains an instruction that may throw or otherwise exit abnormally. |
blockMayThrow [virtual] | Returns true iff the block BB potentially may throw exception. It can be false-positive in cases when we want to avoid complex analysis. |
computeLoopSafetyInfo [virtual] | Compute safety information for the given loop. |
copyColors | Copy colors of block Old into the block New. |
getBlockColors | Returns block colors map that is used to update funclet operand bundles. |
isGuaranteedToExecute [virtual] | Returns true if the instruction in a loop is guaranteed to execute at least once (under the assumption that the loop is entered). |
| Name | Description |
|---|---|
computeBlockColors | Computes block colors. |
| Name | Description |
|---|---|
ICFLoopSafetyInfo | Precise LoopSafetyInfo based on ImplicitControlFlowTracking. |
SimpleLoopSafetyInfo | Simple and conservative implementation of LoopSafetyInfo that can give false-positive answers to its queries in order to avoid complicated analysis. |