LLVM  4.0.0
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 <CGSCCPassManager.h>

Collaboration diagram for llvm::CGSCCUpdateResult:
[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...
 

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

Member Data Documentation

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

Referenced by llvm::updateCGAndAnalysisManagerForFunctionPass().

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

Referenced by llvm::updateCGAndAnalysisManagerForFunctionPass().

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

Referenced by llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run(), llvm::DevirtSCCRepeatedPass< PassT >::run(), and llvm::updateCGAndAnalysisManagerForFunctionPass().

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

Referenced by llvm::updateCGAndAnalysisManagerForFunctionPass().

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

Referenced by llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), llvm::DevirtSCCRepeatedPass< PassT >::run(), and llvm::updateCGAndAnalysisManagerForFunctionPass().

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

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


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