class SimpleLoopSafetyInfo

Declaration

class SimpleLoopSafetyInfo : public LoopSafetyInfo { /* full declaration omitted */ };

Description

Simple and conservative implementation of LoopSafetyInfo that can give false-positive answers to its queries in order to avoid complicated analysis.

Declared at: llvm/include/llvm/Analysis/MustExecute.h:109

Inherits from: LoopSafetyInfo

Method Overview

Inherited from LoopSafetyInfo:

Methods

SimpleLoopSafetyInfo()

Declared at: llvm/include/llvm/Analysis/MustExecute.h:125

virtual bool anyBlockMayThrow() const

Description

Returns true iff any block of the loop for which this info is contains an instruction that may throw or otherwise exit abnormally.

Declared at: llvm/include/llvm/Analysis/MustExecute.h:117

virtual bool blockMayThrow(
    const llvm::BasicBlock* BB) const

Description

Returns true iff the block \p BB potentially may throw exception. It can be false-positive in cases when we want to avoid complex analysis.

Declared at: llvm/include/llvm/Analysis/MustExecute.h:115

Parameters

const llvm::BasicBlock* BB

virtual void computeLoopSafetyInfo(
    const llvm::Loop* CurLoop)

Description

Computes safety information for a loop checks loop body & header for the possibility of may throw exception, it takes LoopSafetyInfo and loop as argument. Updates safety information in LoopSafetyInfo argument. Note: This is defined to clear and reinitialize an already initialized LoopSafetyInfo. Some callers rely on this fact.

Declared at: llvm/include/llvm/Analysis/MustExecute.h:119

Parameters

const llvm::Loop* CurLoop

virtual bool isGuaranteedToExecute(
    const llvm::Instruction& Inst,
    const llvm::DominatorTree* DT,
    const llvm::Loop* CurLoop) const

Description

Returns true if the instruction in a loop is guaranteed to execute at least once (under the assumption that the loop is entered).

Declared at: llvm/include/llvm/Analysis/MustExecute.h:121

Parameters

const llvm::Instruction& Inst
const llvm::DominatorTree* DT
const llvm::Loop* CurLoop

virtual ~SimpleLoopSafetyInfo()

Declared at: llvm/include/llvm/Analysis/MustExecute.h:127