LLVM
8.0.1
|
#include "llvm/Analysis/CGSCCPassManager.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <iterator>
Go to the source code of this file.
Namespaces | |
llvm | |
This class represents lattice values for constants. | |
Macros | |
#define | DEBUG_TYPE "cgscc" |
Functions | |
static void | updateNewSCCFunctionAnalyses (LazyCallGraph::SCC &C, LazyCallGraph &G, CGSCCAnalysisManager &AM) |
When a new SCC is created for the graph and there might be function analysis results cached for the functions now in that SCC two forms of updates are required. More... | |
template<typename SCCRangeT > | |
static LazyCallGraph::SCC * | incorporateNewSCCRange (const SCCRangeT &NewSCCRange, LazyCallGraph &G, LazyCallGraph::Node &N, LazyCallGraph::SCC *C, CGSCCAnalysisManager &AM, CGSCCUpdateResult &UR) |
Helper function to update both the CGSCCAnalysisManager AM and the CGSCCPassManager's CGSCCUpdateResult UR based on a range of newly added SCCs. More... | |
#define DEBUG_TYPE "cgscc" |
Definition at line 31 of file CGSCCPassManager.cpp.
|
static |
Helper function to update both the CGSCCAnalysisManager
AM
and the CGSCCPassManager's
CGSCCUpdateResult
UR
based on a range of newly added SCCs.
The range of new SCCs must be in postorder already. The SCC they were split out of must be provided as C
. The current node being mutated and triggering updates must be passed as N
.
This function returns the SCC containing N
. This will be either C
if no new SCCs have been split out, or it will be the new SCC containing N
.
Definition at line 361 of file CGSCCPassManager.cpp.
References assert(), llvm::LazyCallGraph::SCC::begin(), C, llvm::CGSCCUpdateResult::CWorklist, llvm::dbgs(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getCachedResult(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::invalidate(), LLVM_DEBUG, llvm::LazyCallGraph::lookupSCC(), llvm::make_range(), llvm::PreservedAnalyses::preserve(), llvm::reverse(), and updateNewSCCFunctionAnalyses().
|
static |
When a new SCC is created for the graph and there might be function analysis results cached for the functions now in that SCC two forms of updates are required.
First, a proxy from the SCC to the FunctionAnalysisManager needs to be created so that any subsequent invalidation events to the SCC are propagated to the function analysis results cached for functions within it.
Second, if any of the functions within the SCC have analysis results with outer analysis dependencies, then those dependencies would point to the wrong SCC's analysis result. We forcibly invalidate the necessary function analyses so that they don't retain stale handles.
Definition at line 316 of file CGSCCPassManager.cpp.
References llvm::PreservedAnalyses::all(), C, F(), G, llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs >::Result::getManager(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), and N.
Referenced by incorporateNewSCCRange().