Loading llvm/include/llvm/Analysis/AliasAnalysis.h +4 −4 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ public: /// approximation to a precise "captures before" analysis. class EarliestEscapeInfo final : public CaptureInfo { DominatorTree &DT; const LoopInfo &LI; const LoopInfo *LI; /// Map from identified local object to an instruction before which it does /// not escape, or nullptr if it never escapes. The "earliest" instruction Loading @@ -184,11 +184,11 @@ class EarliestEscapeInfo final : public CaptureInfo { /// This is used for cache invalidation purposes. DenseMap<Instruction *, TinyPtrVector<const Value *>> Inst2Obj; const SmallPtrSetImpl<const Value *> &EphValues; const SmallPtrSetImpl<const Value *> *EphValues; public: EarliestEscapeInfo(DominatorTree &DT, const LoopInfo &LI, const SmallPtrSetImpl<const Value *> &EphValues) EarliestEscapeInfo(DominatorTree &DT, const LoopInfo *LI = nullptr, const SmallPtrSetImpl<const Value *> *EphValues = nullptr) : DT(DT), LI(LI), EphValues(EphValues) {} bool isNotCapturedBeforeOrAt(const Value *Object, Loading llvm/include/llvm/Analysis/CaptureTracking.h +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ namespace llvm { Instruction * FindEarliestCapture(const Value *V, Function &F, bool ReturnCaptures, bool StoreCaptures, const DominatorTree &DT, const SmallPtrSetImpl<const Value *> &EphValues, const SmallPtrSetImpl<const Value *> *EphValues = nullptr, unsigned MaxUsesToExplore = 0); /// This callback is used in conjunction with PointerMayBeCaptured. In Loading llvm/lib/Analysis/BasicAliasAnalysis.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ bool EarliestEscapeInfo::isNotCapturedBeforeOrAt(const Value *Object, return true; return I != Iter.first->second && !isPotentiallyReachable(Iter.first->second, I, nullptr, &DT, &LI); !isPotentiallyReachable(Iter.first->second, I, nullptr, &DT, LI); } void EarliestEscapeInfo::removeInstruction(Instruction *I) { Loading llvm/lib/Analysis/CaptureTracking.cpp +4 −5 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ namespace { struct EarliestCaptures : public CaptureTracker { EarliestCaptures(bool ReturnCaptures, Function &F, const DominatorTree &DT, const SmallPtrSetImpl<const Value *> &EphValues) const SmallPtrSetImpl<const Value *> *EphValues) : EphValues(EphValues), DT(DT), ReturnCaptures(ReturnCaptures), F(F) {} void tooManyUses() override { Loading @@ -180,7 +180,7 @@ namespace { if (isa<ReturnInst>(I) && !ReturnCaptures) return false; if (EphValues.contains(I)) if (EphValues && EphValues->contains(I)) return false; if (!EarliestCapture) Loading @@ -194,7 +194,7 @@ namespace { return false; } const SmallPtrSetImpl<const Value *> &EphValues; const SmallPtrSetImpl<const Value *> *EphValues; Instruction *EarliestCapture = nullptr; Loading Loading @@ -286,8 +286,7 @@ bool llvm::PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures, Instruction * llvm::FindEarliestCapture(const Value *V, Function &F, bool ReturnCaptures, bool StoreCaptures, const DominatorTree &DT, const SmallPtrSetImpl<const Value *> &EphValues, const SmallPtrSetImpl<const Value *> *EphValues, unsigned MaxUsesToExplore) { assert(!isa<GlobalValue>(V) && "It doesn't make sense to ask whether a global is captured."); Loading llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -865,7 +865,7 @@ struct DSEState { DSEState(Function &F, AliasAnalysis &AA, MemorySSA &MSSA, DominatorTree &DT, PostDominatorTree &PDT, AssumptionCache &AC, const TargetLibraryInfo &TLI, const LoopInfo &LI) : F(F), AA(AA), EI(DT, LI, EphValues), BatchAA(AA, &EI), MSSA(MSSA), : F(F), AA(AA), EI(DT, &LI, &EphValues), BatchAA(AA, &EI), MSSA(MSSA), DT(DT), PDT(PDT), TLI(TLI), DL(F.getParent()->getDataLayout()), LI(LI) { // Collect blocks with throwing instructions not modeled in MemorySSA and // alloc-like objects. Loading Loading
llvm/include/llvm/Analysis/AliasAnalysis.h +4 −4 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ public: /// approximation to a precise "captures before" analysis. class EarliestEscapeInfo final : public CaptureInfo { DominatorTree &DT; const LoopInfo &LI; const LoopInfo *LI; /// Map from identified local object to an instruction before which it does /// not escape, or nullptr if it never escapes. The "earliest" instruction Loading @@ -184,11 +184,11 @@ class EarliestEscapeInfo final : public CaptureInfo { /// This is used for cache invalidation purposes. DenseMap<Instruction *, TinyPtrVector<const Value *>> Inst2Obj; const SmallPtrSetImpl<const Value *> &EphValues; const SmallPtrSetImpl<const Value *> *EphValues; public: EarliestEscapeInfo(DominatorTree &DT, const LoopInfo &LI, const SmallPtrSetImpl<const Value *> &EphValues) EarliestEscapeInfo(DominatorTree &DT, const LoopInfo *LI = nullptr, const SmallPtrSetImpl<const Value *> *EphValues = nullptr) : DT(DT), LI(LI), EphValues(EphValues) {} bool isNotCapturedBeforeOrAt(const Value *Object, Loading
llvm/include/llvm/Analysis/CaptureTracking.h +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ namespace llvm { Instruction * FindEarliestCapture(const Value *V, Function &F, bool ReturnCaptures, bool StoreCaptures, const DominatorTree &DT, const SmallPtrSetImpl<const Value *> &EphValues, const SmallPtrSetImpl<const Value *> *EphValues = nullptr, unsigned MaxUsesToExplore = 0); /// This callback is used in conjunction with PointerMayBeCaptured. In Loading
llvm/lib/Analysis/BasicAliasAnalysis.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ bool EarliestEscapeInfo::isNotCapturedBeforeOrAt(const Value *Object, return true; return I != Iter.first->second && !isPotentiallyReachable(Iter.first->second, I, nullptr, &DT, &LI); !isPotentiallyReachable(Iter.first->second, I, nullptr, &DT, LI); } void EarliestEscapeInfo::removeInstruction(Instruction *I) { Loading
llvm/lib/Analysis/CaptureTracking.cpp +4 −5 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ namespace { struct EarliestCaptures : public CaptureTracker { EarliestCaptures(bool ReturnCaptures, Function &F, const DominatorTree &DT, const SmallPtrSetImpl<const Value *> &EphValues) const SmallPtrSetImpl<const Value *> *EphValues) : EphValues(EphValues), DT(DT), ReturnCaptures(ReturnCaptures), F(F) {} void tooManyUses() override { Loading @@ -180,7 +180,7 @@ namespace { if (isa<ReturnInst>(I) && !ReturnCaptures) return false; if (EphValues.contains(I)) if (EphValues && EphValues->contains(I)) return false; if (!EarliestCapture) Loading @@ -194,7 +194,7 @@ namespace { return false; } const SmallPtrSetImpl<const Value *> &EphValues; const SmallPtrSetImpl<const Value *> *EphValues; Instruction *EarliestCapture = nullptr; Loading Loading @@ -286,8 +286,7 @@ bool llvm::PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures, Instruction * llvm::FindEarliestCapture(const Value *V, Function &F, bool ReturnCaptures, bool StoreCaptures, const DominatorTree &DT, const SmallPtrSetImpl<const Value *> &EphValues, const SmallPtrSetImpl<const Value *> *EphValues, unsigned MaxUsesToExplore) { assert(!isa<GlobalValue>(V) && "It doesn't make sense to ask whether a global is captured."); Loading
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -865,7 +865,7 @@ struct DSEState { DSEState(Function &F, AliasAnalysis &AA, MemorySSA &MSSA, DominatorTree &DT, PostDominatorTree &PDT, AssumptionCache &AC, const TargetLibraryInfo &TLI, const LoopInfo &LI) : F(F), AA(AA), EI(DT, LI, EphValues), BatchAA(AA, &EI), MSSA(MSSA), : F(F), AA(AA), EI(DT, &LI, &EphValues), BatchAA(AA, &EI), MSSA(MSSA), DT(DT), PDT(PDT), TLI(TLI), DL(F.getParent()->getDataLayout()), LI(LI) { // Collect blocks with throwing instructions not modeled in MemorySSA and // alloc-like objects. Loading