LLVM 20.0.0git
|
A helper that repeats an SCC pass each time an indirect call is refined to a direct call by that pass. More...
#include "llvm/Analysis/CGSCCPassManager.h"
Public Types | |
using | PassConceptT = detail::PassConcept< LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult & > |
Public Member Functions | |
DevirtSCCRepeatedPass (std::unique_ptr< PassConceptT > Pass, int MaxIterations) | |
PreservedAnalyses | run (LazyCallGraph::SCC &InitialC, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) |
Runs the wrapped pass up to MaxIterations on the SCC, iterating whenever an indirect call is refined. | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Public Member Functions inherited from llvm::PassInfoMixin< DevirtSCCRepeatedPass > | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::PassInfoMixin< DevirtSCCRepeatedPass > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. | |
A helper that repeats an SCC pass each time an indirect call is refined to a direct call by that pass.
While the CGSCC pass manager works to re-visit SCCs and RefSCCs as they change shape, we may also want to repeat an SCC pass if it simply refines an indirect call to a direct call, even if doing so does not alter the shape of the graph. Note that this only pertains to direct calls to functions where IPO across the SCC may be able to compute more precise results. For intrinsics, we assume scalar optimizations already can fully reason about them.
This repetition has the potential to be very large however, as each one might refine a single call site. As a consequence, in practice we use an upper bound on the number of repetitions to limit things.
Definition at line 542 of file CGSCCPassManager.h.
using llvm::DevirtSCCRepeatedPass::PassConceptT = detail::PassConcept<LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult &> |
Definition at line 544 of file CGSCCPassManager.h.
|
inlineexplicit |
Definition at line 548 of file CGSCCPassManager.h.
|
inline |
Definition at line 557 of file CGSCCPassManager.h.
References OS.
PreservedAnalyses llvm::DevirtSCCRepeatedPass::run | ( | LazyCallGraph::SCC & | InitialC, |
CGSCCAnalysisManager & | AM, | ||
LazyCallGraph & | CG, | ||
CGSCCUpdateResult & | UR | ||
) |
Runs the wrapped pass up to MaxIterations
on the SCC, iterating whenever an indirect call is refined.
Definition at line 358 of file CGSCCPassManager.cpp.
References llvm::AbortOnMaxDevirtIterationsReached, llvm::PreservedAnalyses::all(), llvm::any_of(), assert(), llvm::CallingConv::C, llvm::dbgs(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), I, llvm::CGSCCUpdateResult::IndirectVHs, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), instructions, llvm::PreservedAnalyses::intersect(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::invalidate(), llvm::CGSCCUpdateResult::InvalidatedSCCs, LLVM_DEBUG, N, P, llvm::report_fatal_error(), llvm::PassInstrumentation::runAfterPass(), llvm::PassInstrumentation::runAfterPassInvalidated(), llvm::PassInstrumentation::runBeforePass(), and llvm::CGSCCUpdateResult::UpdatedC.