17 #ifndef LLVM_ANALYSIS_MUSTEXECUTE_H 18 #define LLVM_ANALYSIS_MUSTEXECUTE_H 87 const Loop *CurLoop)
const = 0;
99 bool MayThrow =
false;
101 bool HeaderMayThrow =
false;
112 const Loop *CurLoop)
const;
125 bool MayThrow =
false;
141 const Loop *CurLoop)
const;
145 bool doesNotWriteMemoryBefore(
const BasicBlock *BB,
const Loop *CurLoop)
virtual bool blockMayThrow(const BasicBlock *BB) const =0
Returns true iff the block BB potentially may throw exception.
This class represents lattice values for constants.
virtual bool anyBlockMayThrow() const =0
Returns true iff any block of the loop for which this info is contains an instruction that may throw ...
Simple and conservative implementation of LoopSafetyInfo that can give false-positive answers to its ...
This implementation of LoopSafetyInfo use ImplicitControlFlowTracking to give precise answers on "may...
void copyColors(BasicBlock *New, BasicBlock *Old)
Copy colors of block Old into the block New.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
virtual bool isGuaranteedToExecute(const Instruction &Inst, const DominatorTree *DT, const Loop *CurLoop) const =0
Returns true if the instruction in a loop is guaranteed to execute at least once (under the assumptio...
LLVM Basic Block Representation.
ICFLoopSafetyInfo(DominatorTree *DT)
virtual ~LoopSafetyInfo()=default
bool allLoopPathsLeadToBlock(const Loop *CurLoop, const BasicBlock *BB, const DominatorTree *DT) const
Return true if we must reach the block BB under assumption that the loop CurLoop is entered...
void computeBlockColors(const Loop *CurLoop)
Computes block colors.
virtual ~ICFLoopSafetyInfo()
Represents a single loop in the control flow graph.
virtual ~SimpleLoopSafetyInfo()
Captures loop safety information.
This class allows to keep track on instructions with implicit control flow.
virtual void computeLoopSafetyInfo(const Loop *CurLoop)=0
Computes safety information for a loop checks loop body & header for the possibility of may throw exc...
const DenseMap< BasicBlock *, ColorVector > & getBlockColors() const
Returns block colors map that is used to update funclet operand bundles.