|
LLVM 24.0.0git
|
Context-sensitive CaptureAnalysis provider, which computes and caches the earliest common dominator closure of all captures. More...
#include "llvm/Analysis/AliasAnalysis.h"
Public Member Functions | |
| EarliestEscapeAnalysis (DominatorTree &DT, const LoopInfo *LI=nullptr, const CycleInfo *CI=nullptr) | |
| CaptureComponents | getCapturesBefore (const Value *Object, const Instruction *I, bool OrAt, bool ReturnCaptures) override |
| Return how Object may be captured before instruction I, considering only provenance captures. | |
| void | removeInstruction (Instruction *I) |
| void | insertPotentialCapture (const Instruction *I) |
Notify the analysis that I is about to be inserted or moved. | |
| Public Member Functions inherited from llvm::CaptureAnalysis | |
| virtual | ~CaptureAnalysis ()=0 |
Context-sensitive CaptureAnalysis provider, which computes and caches the earliest common dominator closure of all captures.
It provides a good approximation to a precise "captures before" analysis.
Users must call removeInstruction() and insertPotentialCapture() on IR changes. The CFG must not gain paths between existing blocks and blocks must not be renumbered.
Definition at line 182 of file AliasAnalysis.h.
| EarliestEscapeAnalysis::EarliestEscapeAnalysis | ( | DominatorTree & | DT, |
| const LoopInfo * | LI = nullptr, | ||
| const CycleInfo * | CI = nullptr ) |
Definition at line 228 of file BasicAliasAnalysis.cpp.
References getParent(), and getRoot().
|
overridevirtual |
Return how Object may be captured before instruction I, considering only provenance captures.
If OrAt is true, captures by instruction I itself are also considered.
If I is nullptr, then captures at any point will be considered.
Implements llvm::CaptureAnalysis.
Definition at line 234 of file BasicAliasAnalysis.cpp.
References assert(), llvm::Instruction::comesBefore(), llvm::FindEarliestCapture(), llvm::Function::getBlockNumberEpoch(), llvm::BasicBlock::getNumber(), llvm::BasicBlock::getParent(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), I, llvm::isIdentifiedFunctionLocal(), isNotInCycle(), llvm::isPotentiallyReachable(), llvm::None, and llvm::Provenance.
Referenced by isFuncLocalAndNotCaptured().
| void EarliestEscapeAnalysis::insertPotentialCapture | ( | const Instruction * | I | ) |
Notify the analysis that I is about to be inserted or moved.
If I may capture a pointer, any cached earliest escape may no longer precede all captures, so the whole cache is dropped.
Definition at line 309 of file BasicAliasAnalysis.cpp.
References llvm::capturesAnyProvenance(), llvm::DetermineUseCaptureKind(), and I.
| void EarliestEscapeAnalysis::removeInstruction | ( | Instruction * | I | ) |
Definition at line 300 of file BasicAliasAnalysis.cpp.
References I.