LLVM: llvm::CGSCCUpdateResult Struct Reference (original) (raw)

Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager infrastructure. More...

#include "[llvm/Analysis/CGSCCPassManager.h](CGSCCPassManager%5F8h%5Fsource.html)"

Public Attributes
SmallPriorityWorklist< LazyCallGraph::SCC *, 1 > & CWorklist
Worklist of the SCCs queued for processing.
SmallPtrSetImpl< LazyCallGraph::SCC * > & InvalidatedSCCs
The set of invalidated SCCs which should be skipped if they are found in CWorklist.
LazyCallGraph::SCC * UpdatedC
If non-null, the updated current SCC being processed.
PreservedAnalyses CrossSCCPA
Preserved analyses across SCCs.
SmallDenseSet< std::pair< LazyCallGraph::Node *, LazyCallGraph::SCC * >, 4 > & InlinedInternalEdges
A hacky area where the inliner can retain history about inlining decisions that mutated the call graph's SCC structure in order to avoid infinite inlining.
SmallVector< Function *, 4 > & DeadFunctions
Functions that a pass has considered to be dead to be removed at the end of the call graph walk in batch.
SmallMapVector< Value *, WeakTrackingVH, 16 > IndirectVHs
Weak VHs to keep track of indirect calls for the purposes of detecting devirtualization.

Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager infrastructure.

The CGSCC pass manager runs SCC passes which are allowed to update the call graph and SCC structures. This means the structure the pass manager works on is mutating underneath it. In order to support that, there needs to be careful communication about the precise nature and ramifications of these updates to the pass management infrastructure.

All SCC passes will have to accept a reference to the management layer's update result struct and use it to reflect the results of any CG updates performed.

Passes which do not change the call graph structure in any way can just ignore this argument to their run method.

Definition at line 233 of file CGSCCPassManager.h.

CrossSCCPA

Preserved analyses across SCCs.

We specifically want to allow CGSCC passes to mutate ancestor IR (changing both the CG structure and the function IR itself). However, this means we need to take special care to correctly mark what analyses are preserved across SCCs. We have to track this out-of-band here because within the main PassManager infrastructure we need to mark everything within an SCC as preserved in order to avoid repeatedly invalidating the same analyses as we unnest pass managers and adaptors. So we track the cross-SCC version of the preserved analyses here from any code that does direct invalidation of SCC analyses, and then use it whenever we move forward in the post-order walk of SCCs before running passes over the new SCC.

Definition at line 280 of file CGSCCPassManager.h.

Referenced by llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), and llvm::PassManager< LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, CGSCCUpdateResult & >::run().

CWorklist

Worklist of the SCCs queued for processing.

When a pass refines the graph and creates new SCCs or causes them to have a different shape or set of component functions it should add the SCCs to this worklist so that we visit them in the refined form.

Note that if the SCCs are part of a RefSCC that is added to the RCWorklist, they don't need to be added here as visiting the RefSCC will be sufficient to re-visit the SCCs within it.

This worklist is in reverse post-order, as we pop off the back in order to observe SCCs in post-order. When adding SCCs, clients should add them in reverse post-order.

Definition at line 247 of file CGSCCPassManager.h.

Referenced by incorporateNewSCCRange(), llvm::CoroSplitPass::run(), llvm::InlinerPass::run(), and updateCGAndAnalysisManagerForPass().

DeadFunctions

IndirectVHs

InlinedInternalEdges

A hacky area where the inliner can retain history about inlining decisions that mutated the call graph's SCC structure in order to avoid infinite inlining.

See the comments in the inliner's CG update logic.

FIXME: Keeping this here seems like a big layering issue, we should look for a better technique.

Definition at line 289 of file CGSCCPassManager.h.

Referenced by llvm::InlinerPass::run().

InvalidatedSCCs

UpdatedC


The documentation for this struct was generated from the following file: