class DevirtSCCRepeatedPass

Declaration

class DevirtSCCRepeatedPass : public PassInfoMixin { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/Analysis/CGSCCPassManager.h:551

Inherits from: PassInfoMixin

Member Variables

private std::unique_ptr<PassConceptT> Pass
private int MaxIterations

Method Overview

  • public DevirtSCCRepeatedPass(std::unique_ptr<PassConceptT> Pass, int MaxIterations)
  • public void printPipeline(llvm::raw_ostream & OS, function_ref<llvm::StringRef (llvm::StringRef)> MapClassName2PassName)
  • public llvm::PreservedAnalyses run(LazyCallGraph::SCC & InitialC, llvm::CGSCCAnalysisManager & AM, llvm::LazyCallGraph & CG, llvm::CGSCCUpdateResult & UR)

Methods

DevirtSCCRepeatedPass(
    std::unique_ptr<PassConceptT> Pass,
    int MaxIterations)

Declared at: llvm/include/llvm/Analysis/CGSCCPassManager.h:557

Parameters

std::unique_ptr<PassConceptT> Pass
int MaxIterations

void printPipeline(
    llvm::raw_ostream& OS,
    function_ref<llvm::StringRef(llvm::StringRef)>
        MapClassName2PassName)

Declared at: llvm/include/llvm/Analysis/CGSCCPassManager.h:566

Parameters

llvm::raw_ostream& OS
function_ref<llvm::StringRef(llvm::StringRef)> MapClassName2PassName

llvm::PreservedAnalyses run(
    LazyCallGraph::SCC& InitialC,
    llvm::CGSCCAnalysisManager& AM,
    llvm::LazyCallGraph& CG,
    llvm::CGSCCUpdateResult& UR)

Description

Runs the wrapped pass up to \c MaxIterations on the SCC, iterating whenever an indirect call is refined.

Declared at: llvm/include/llvm/Analysis/CGSCCPassManager.h:563

Parameters

LazyCallGraph::SCC& InitialC
llvm::CGSCCAnalysisManager& AM
llvm::LazyCallGraph& CG
llvm::CGSCCUpdateResult& UR