LLVM  8.0.1
Public Attributes | List of all members
llvm::CGSCCUpdateResult Struct Reference

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

#include "llvm/Analysis/CGSCCPassManager.h"

Collaboration diagram for llvm::CGSCCUpdateResult:
Collaboration graph
[legend]

Public Attributes

SmallPriorityWorklist< LazyCallGraph::RefSCC *, 1 > & RCWorklist
 Worklist of the RefSCCs queued for processing. More...
 
SmallPriorityWorklist< LazyCallGraph::SCC *, 1 > & CWorklist
 Worklist of the SCCs queued for processing. More...
 
SmallPtrSetImpl< LazyCallGraph::RefSCC * > & InvalidatedRefSCCs
 The set of invalidated RefSCCs which should be skipped if they are found in RCWorklist. More...
 
SmallPtrSetImpl< LazyCallGraph::SCC * > & InvalidatedSCCs
 The set of invalidated SCCs which should be skipped if they are found in CWorklist. More...
 
LazyCallGraph::RefSCCUpdatedRC
 If non-null, the updated current RefSCC being processed. More...
 
LazyCallGraph::SCCUpdatedC
 If non-null, the updated current SCC being processed. More...
 
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. More...
 

Detailed Description

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

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 232 of file CGSCCPassManager.h.

Member Data Documentation

◆ CWorklist

SmallPriorityWorklist<LazyCallGraph::SCC *, 1>& llvm::CGSCCUpdateResult::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 257 of file CGSCCPassManager.h.

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

◆ InlinedInternalEdges

SmallDenseSet<std::pair<LazyCallGraph::Node *, LazyCallGraph::SCC *>, 4>& llvm::CGSCCUpdateResult::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 302 of file CGSCCPassManager.h.

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

◆ InvalidatedRefSCCs

SmallPtrSetImpl<LazyCallGraph::RefSCC *>& llvm::CGSCCUpdateResult::InvalidatedRefSCCs

The set of invalidated RefSCCs which should be skipped if they are found in RCWorklist.

This is used to quickly prune out RefSCCs when they get deleted and happen to already be on the worklist. We use this primarily to avoid scanning the list and removing entries from it.

Definition at line 265 of file CGSCCPassManager.h.

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

◆ InvalidatedSCCs

SmallPtrSetImpl<LazyCallGraph::SCC *>& llvm::CGSCCUpdateResult::InvalidatedSCCs

The set of invalidated SCCs which should be skipped if they are found in CWorklist.

This is used to quickly prune out SCCs when they get deleted and happen to already be on the worklist. We use this primarily to avoid scanning the list and removing entries from it.

Definition at line 273 of file CGSCCPassManager.h.

Referenced by llvm::PassManager< Function >::run(), llvm::InlinerPass::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), and llvm::DevirtSCCRepeatedPass< PassT >::run().

◆ RCWorklist

SmallPriorityWorklist<LazyCallGraph::RefSCC *, 1>& llvm::CGSCCUpdateResult::RCWorklist

Worklist of the RefSCCs queued for processing.

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

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

Definition at line 242 of file CGSCCPassManager.h.

◆ UpdatedC

LazyCallGraph::SCC* llvm::CGSCCUpdateResult::UpdatedC

If non-null, the updated current SCC being processed.

This is set when a graph refinement takes place an the "current" point in the graph moves "down" or earlier in the post-order walk. This will often cause the "current" SCC to be a newly created SCC object and the old one to be added to the above worklist. When that happens, this pointer is non-null and can be used to continue processing the "top" of the post-order walk.

Definition at line 293 of file CGSCCPassManager.h.

Referenced by llvm::PassManager< Function >::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), and llvm::DevirtSCCRepeatedPass< PassT >::run().

◆ UpdatedRC

LazyCallGraph::RefSCC* llvm::CGSCCUpdateResult::UpdatedRC

If non-null, the updated current RefSCC being processed.

This is set when a graph refinement takes place an the "current" point in the graph moves "down" or earlier in the post-order walk. This will often cause the "current" RefSCC to be a newly created RefSCC object and the old one to be added to the above worklist. When that happens, this pointer is non-null and can be used to continue processing the "top" of the post-order walk.

Definition at line 283 of file CGSCCPassManager.h.

Referenced by llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run().


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