Skip to content

Commit

Permalink
[NewPassManager] Rename AM to OuterAM in the OuterAnalysisManagerProx…
Browse files Browse the repository at this point in the history
…y [NFCI].

Provides clarity and consistency with the InnerAnalysisManagerProxy.
  • Loading branch information
alinas committed Jan 2, 2020
1 parent 31210d1 commit a0d496d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions llvm/include/llvm/IR/PassManager.h
Expand Up @@ -1165,9 +1165,9 @@ class OuterAnalysisManagerProxy
/// Result proxy object for \c OuterAnalysisManagerProxy.
class Result {
public:
explicit Result(const AnalysisManagerT &AM) : AM(&AM) {}
explicit Result(const AnalysisManagerT &OuterAM) : OuterAM(&OuterAM) {}

const AnalysisManagerT &getManager() const { return *AM; }
const AnalysisManagerT &getManager() const { return *OuterAM; }

/// When invalidation occurs, remove any registered invalidation events.
bool invalidate(
Expand Down Expand Up @@ -1219,22 +1219,23 @@ class OuterAnalysisManagerProxy
}

private:
const AnalysisManagerT *AM;
const AnalysisManagerT *OuterAM;

/// A map from an outer analysis ID to the set of this IR-unit's analyses
/// which need to be invalidated.
SmallDenseMap<AnalysisKey *, TinyPtrVector<AnalysisKey *>, 2>
OuterAnalysisInvalidationMap;
};

OuterAnalysisManagerProxy(const AnalysisManagerT &AM) : AM(&AM) {}
OuterAnalysisManagerProxy(const AnalysisManagerT &OuterAM)
: OuterAM(&OuterAM) {}

/// Run the analysis pass and create our proxy result object.
/// Nothing to see here, it just forwards the \c AM reference into the
/// Nothing to see here, it just forwards the \c OuterAM reference into the
/// result.
Result run(IRUnitT &, AnalysisManager<IRUnitT, ExtraArgTs...> &,
ExtraArgTs...) {
return Result(*AM);
return Result(*OuterAM);
}

private:
Expand All @@ -1243,7 +1244,7 @@ class OuterAnalysisManagerProxy

static AnalysisKey Key;

const AnalysisManagerT *AM;
const AnalysisManagerT *OuterAM;
};

template <typename AnalysisManagerT, typename IRUnitT, typename... ExtraArgTs>
Expand Down

0 comments on commit a0d496d

Please sign in to comment.