blob: d090b5afd2e7ef9d00dba0e310485c5daf324172 [file] [log] [blame]
Chris Lattnerf7e95942003-08-31 01:54:59 +00001//===- CallGraphSCCPass.cpp - Pass that operates BU on call graph ---------===//
Misha Brukman01808ca2005-04-21 21:13:18 +00002//
John Criswell482202a2003-10-20 19:43:21 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Misha Brukman01808ca2005-04-21 21:13:18 +00007//
John Criswell482202a2003-10-20 19:43:21 +00008//===----------------------------------------------------------------------===//
Chris Lattnerf7e95942003-08-31 01:54:59 +00009//
10// This file implements the CallGraphSCCPass class, which is used for passes
11// which are implemented as bottom-up traversals on the call graph. Because
12// there may be cycles in the call graph, passes of this type operate on the
13// call-graph in SCC order: that is, they process function bottom-up, except for
14// recursive functions, which they process all at once.
15//
16//===----------------------------------------------------------------------===//
17
Chandler Carruth839a98e2013-01-07 15:26:48 +000018#include "llvm/Analysis/CallGraphSCCPass.h"
Eugene Zelenkofa6434b2017-08-31 21:56:16 +000019#include "llvm/ADT/DenseMap.h"
Reid Spencer7c16caa2004-09-01 22:55:40 +000020#include "llvm/ADT/SCCIterator.h"
Chris Lattner6fbe7042010-04-21 00:47:40 +000021#include "llvm/ADT/Statistic.h"
Chandler Carruthed0881b2012-12-03 16:50:05 +000022#include "llvm/Analysis/CallGraph.h"
Eugene Zelenkofa6434b2017-08-31 21:56:16 +000023#include "llvm/IR/CallSite.h"
Chandler Carruth9fb823b2013-01-02 11:36:10 +000024#include "llvm/IR/Function.h"
Eugene Zelenkofa6434b2017-08-31 21:56:16 +000025#include "llvm/IR/Intrinsics.h"
Juergen Ributzka34390c72014-05-16 02:33:15 +000026#include "llvm/IR/LLVMContext.h"
Chandler Carruthd9903882015-01-14 11:23:27 +000027#include "llvm/IR/LegacyPassManagers.h"
Eugene Zelenkofa6434b2017-08-31 21:56:16 +000028#include "llvm/IR/Module.h"
Andrew Kayloraa641a52016-04-22 22:06:11 +000029#include "llvm/IR/OptBisect.h"
Fedor Sergeev43083112018-08-28 21:06:51 +000030#include "llvm/IR/PassTimingInfo.h"
Eugene Zelenkofa6434b2017-08-31 21:56:16 +000031#include "llvm/Pass.h"
Chris Lattner6fbe7042010-04-21 00:47:40 +000032#include "llvm/Support/CommandLine.h"
Chris Lattnereedcd842009-08-31 07:23:46 +000033#include "llvm/Support/Debug.h"
Chris Lattner707431c2010-03-30 04:03:22 +000034#include "llvm/Support/Timer.h"
Chris Lattner13626022009-08-23 06:03:38 +000035#include "llvm/Support/raw_ostream.h"
Eugene Zelenkofa6434b2017-08-31 21:56:16 +000036#include <cassert>
37#include <string>
38#include <utility>
39#include <vector>
40
Chris Lattner8d083812004-04-20 21:30:06 +000041using namespace llvm;
Brian Gaeke960707c2003-11-11 22:41:34 +000042
Chandler Carruthf1221bd2014-04-22 02:48:03 +000043#define DEBUG_TYPE "cgscc-passmgr"
44
Fangrui Songf78650a2018-07-30 19:41:25 +000045static cl::opt<unsigned>
Chris Lattnerfc8d9ee2010-05-01 01:15:56 +000046MaxIterations("max-cg-scc-iterations", cl::ReallyHidden, cl::init(4));
Chris Lattner6fbe7042010-04-21 00:47:40 +000047
48STATISTIC(MaxSCCIterations, "Maximum CGSCCPassMgr iterations on one SCC");
49
Devang Patel48537a02007-01-17 21:45:01 +000050//===----------------------------------------------------------------------===//
51// CGPassManager
52//
Dale Johannesen50f03762009-09-10 22:01:32 +000053/// CGPassManager manages FPPassManagers and CallGraphSCCPasses.
Devang Patel48537a02007-01-17 21:45:01 +000054
Dan Gohmand78c4002008-05-13 00:00:25 +000055namespace {
56
Devang Patel48537a02007-01-17 21:45:01 +000057class CGPassManager : public ModulePass, public PMDataManager {
Devang Patel48537a02007-01-17 21:45:01 +000058public:
Devang Patel8c78a0b2007-05-03 01:11:54 +000059 static char ID;
Eugene Zelenkofa6434b2017-08-31 21:56:16 +000060
61 explicit CGPassManager() : ModulePass(ID), PMDataManager() {}
Devang Patel48537a02007-01-17 21:45:01 +000062
Sanjay Pateld45a3f12015-03-10 03:48:14 +000063 /// Execute all of the passes scheduled for execution. Keep track of
Devang Patel48537a02007-01-17 21:45:01 +000064 /// whether any of the passes modifies the module, and if so, return true.
Craig Toppere9ba7592014-03-05 07:30:04 +000065 bool runOnModule(Module &M) override;
Devang Patel48537a02007-01-17 21:45:01 +000066
Owen Anderson1aa27512012-11-15 00:14:15 +000067 using ModulePass::doInitialization;
68 using ModulePass::doFinalization;
69
Bill Wendling5f14a012009-02-11 18:19:24 +000070 bool doInitialization(CallGraph &CG);
71 bool doFinalization(CallGraph &CG);
Devang Patel48537a02007-01-17 21:45:01 +000072
73 /// Pass Manager itself does not invalidate any analysis info.
Craig Toppere9ba7592014-03-05 07:30:04 +000074 void getAnalysisUsage(AnalysisUsage &Info) const override {
Devang Patel48537a02007-01-17 21:45:01 +000075 // CGPassManager walks SCC and it needs CallGraph.
Chandler Carruth6378cf52013-11-26 04:19:30 +000076 Info.addRequired<CallGraphWrapperPass>();
Devang Patel48537a02007-01-17 21:45:01 +000077 Info.setPreservesAll();
78 }
79
Mehdi Amini117296c2016-10-01 02:56:57 +000080 StringRef getPassName() const override { return "CallGraph Pass Manager"; }
Devang Patelf7fea8a2007-02-01 22:09:37 +000081
Craig Toppere9ba7592014-03-05 07:30:04 +000082 PMDataManager *getAsPMDataManager() override { return this; }
83 Pass *getAsPass() override { return this; }
Chris Lattner2fa26e52010-01-22 05:24:46 +000084
Devang Patel48537a02007-01-17 21:45:01 +000085 // Print passes managed by this manager
Craig Toppere9ba7592014-03-05 07:30:04 +000086 void dumpPassStructure(unsigned Offset) override {
David Greene3d646312009-12-23 23:09:39 +000087 errs().indent(Offset*2) << "Call Graph SCC Pass Manager\n";
Devang Patel48537a02007-01-17 21:45:01 +000088 for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
89 Pass *P = getContainedPass(Index);
Dan Gohmanf71c5212010-08-19 01:29:07 +000090 P->dumpPassStructure(Offset + 1);
Devang Patel48537a02007-01-17 21:45:01 +000091 dumpLastUses(P, Offset+1);
92 }
93 }
94
95 Pass *getContainedPass(unsigned N) {
Chris Lattner13626022009-08-23 06:03:38 +000096 assert(N < PassVector.size() && "Pass number out of range!");
97 return static_cast<Pass *>(PassVector[N]);
Devang Patel48537a02007-01-17 21:45:01 +000098 }
99
Craig Toppere9ba7592014-03-05 07:30:04 +0000100 PassManagerType getPassManagerType() const override {
Fangrui Songf78650a2018-07-30 19:41:25 +0000101 return PMT_CallGraphPassManager;
Devang Patel48537a02007-01-17 21:45:01 +0000102 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000103
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000104private:
Chris Lattner6fbe7042010-04-21 00:47:40 +0000105 bool RunAllPassesOnSCC(CallGraphSCC &CurSCC, CallGraph &CG,
106 bool &DevirtualizedCall);
Fangrui Songf78650a2018-07-30 19:41:25 +0000107
Chris Lattner4422d312010-04-16 22:42:17 +0000108 bool RunPassOnSCC(Pass *P, CallGraphSCC &CurSCC,
Chris Lattner6fbe7042010-04-21 00:47:40 +0000109 CallGraph &CG, bool &CallGraphUpToDate,
110 bool &DevirtualizedCall);
Mehdi Aminic137c282016-08-08 18:51:05 +0000111 bool RefreshCallGraph(const CallGraphSCC &CurSCC, CallGraph &CG,
Chris Lattnere33167a2009-09-01 18:32:03 +0000112 bool IsCheckingMode);
Devang Patel48537a02007-01-17 21:45:01 +0000113};
114
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000115} // end anonymous namespace.
Dan Gohmand78c4002008-05-13 00:00:25 +0000116
Devang Patel8c78a0b2007-05-03 01:11:54 +0000117char CGPassManager::ID = 0;
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000118
Chris Lattner4422d312010-04-16 22:42:17 +0000119bool CGPassManager::RunPassOnSCC(Pass *P, CallGraphSCC &CurSCC,
Chris Lattner6fbe7042010-04-21 00:47:40 +0000120 CallGraph &CG, bool &CallGraphUpToDate,
121 bool &DevirtualizedCall) {
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000122 bool Changed = false;
Chris Lattner0b1c7232010-01-22 05:46:59 +0000123 PMDataManager *PM = P->getAsPMDataManager();
Jessica Paquettee49374d2018-05-18 17:26:39 +0000124 Module &M = CG.getModule();
Chris Lattner0b1c7232010-01-22 05:46:59 +0000125
Craig Topper353eda42014-04-24 06:44:33 +0000126 if (!PM) {
Chris Lattner0b1c7232010-01-22 05:46:59 +0000127 CallGraphSCCPass *CGSP = (CallGraphSCCPass*)P;
Chris Lattnereedcd842009-08-31 07:23:46 +0000128 if (!CallGraphUpToDate) {
Chris Lattner6fbe7042010-04-21 00:47:40 +0000129 DevirtualizedCall |= RefreshCallGraph(CurSCC, CG, false);
Chris Lattnereedcd842009-08-31 07:23:46 +0000130 CallGraphUpToDate = true;
131 }
Chris Lattner339c82d2009-09-01 20:33:43 +0000132
Chris Lattner707431c2010-03-30 04:03:22 +0000133 {
Jessica Paquette1fc443b2018-08-31 20:20:56 +0000134 unsigned InstrCount, SCCCount = 0;
Xin Tong023e25a2018-07-22 05:27:41 +0000135 bool EmitICRemark = M.shouldEmitInstrCountChangedRemark();
Chris Lattner707431c2010-03-30 04:03:22 +0000136 TimeRegion PassTimer(getPassTimer(CGSP));
Xin Tong023e25a2018-07-22 05:27:41 +0000137 if (EmitICRemark)
138 InstrCount = initSizeRemarkInfo(M);
Chris Lattner707431c2010-03-30 04:03:22 +0000139 Changed = CGSP->runOnSCC(CurSCC);
Jessica Paquettee49374d2018-05-18 17:26:39 +0000140
Jessica Paquette1fc443b2018-08-31 20:20:56 +0000141 if (EmitICRemark) {
142 // FIXME: Add getInstructionCount to CallGraphSCC.
143 // TODO: emitInstrCountChangedRemark should take in the delta between
144 // SCCount and InstrCount.
145 SCCCount = M.getInstructionCount();
146 // Is there a difference in the number of instructions in the module?
147 if (SCCCount != InstrCount) {
148 // Yep. Emit a remark and update InstrCount.
149 emitInstrCountChangedRemark(P, M, InstrCount);
150 InstrCount = SCCCount;
151 }
152 }
Chris Lattner707431c2010-03-30 04:03:22 +0000153 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000154
Chris Lattnere33167a2009-09-01 18:32:03 +0000155 // After the CGSCCPass is done, when assertions are enabled, use
156 // RefreshCallGraph to verify that the callgraph was correctly updated.
157#ifndef NDEBUG
158 if (Changed)
159 RefreshCallGraph(CurSCC, CG, true);
160#endif
Fangrui Songf78650a2018-07-30 19:41:25 +0000161
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000162 return Changed;
163 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000164
Chris Lattner0b1c7232010-01-22 05:46:59 +0000165 assert(PM->getPassManagerType() == PMT_FunctionPassManager &&
166 "Invalid CGPassManager member");
167 FPPassManager *FPP = (FPPassManager*)P;
Fangrui Songf78650a2018-07-30 19:41:25 +0000168
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000169 // Run pass P on all functions in the current SCC.
Sanjay Patelc6012542015-03-10 03:26:39 +0000170 for (CallGraphNode *CGN : CurSCC) {
171 if (Function *F = CGN->getFunction()) {
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000172 dumpPassInfo(P, EXECUTION_MSG, ON_FUNCTION_MSG, F->getName());
Juergen Ributzka34390c72014-05-16 02:33:15 +0000173 {
174 TimeRegion PassTimer(getPassTimer(FPP));
175 Changed |= FPP->runOnFunction(*F);
176 }
177 F->getContext().yield();
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000178 }
179 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000180
Chris Lattnera9262bb2009-08-31 17:08:30 +0000181 // The function pass(es) modified the IR, they may have clobbered the
Chris Lattnereedcd842009-08-31 07:23:46 +0000182 // callgraph.
183 if (Changed && CallGraphUpToDate) {
Nicola Zaghend34e60c2018-05-14 12:53:11 +0000184 LLVM_DEBUG(dbgs() << "CGSCCPASSMGR: Pass Dirtied SCC: " << P->getPassName()
185 << '\n');
Chris Lattnereedcd842009-08-31 07:23:46 +0000186 CallGraphUpToDate = false;
187 }
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000188 return Changed;
189}
190
Sanjay Pateld45a3f12015-03-10 03:48:14 +0000191/// Scan the functions in the specified CFG and resync the
Chris Lattnere33167a2009-09-01 18:32:03 +0000192/// callgraph with the call sites found in it. This is used after
193/// FunctionPasses have potentially munged the callgraph, and can be used after
194/// CallGraphSCC passes to verify that they correctly updated the callgraph.
195///
Chris Lattner6fbe7042010-04-21 00:47:40 +0000196/// This function returns true if it devirtualized an existing function call,
197/// meaning it turned an indirect call into a direct call. This happens when
198/// a function pass like GVN optimizes away stuff feeding the indirect call.
199/// This never happens in checking mode.
Mehdi Aminic137c282016-08-08 18:51:05 +0000200bool CGPassManager::RefreshCallGraph(const CallGraphSCC &CurSCC, CallGraph &CG,
201 bool CheckingMode) {
Chris Lattner063d0652009-09-01 06:31:31 +0000202 DenseMap<Value*, CallGraphNode*> CallSites;
Nicola Zaghend34e60c2018-05-14 12:53:11 +0000203
204 LLVM_DEBUG(dbgs() << "CGSCCPASSMGR: Refreshing SCC with " << CurSCC.size()
205 << " nodes:\n";
206 for (CallGraphNode *CGN
207 : CurSCC) CGN->dump(););
Chris Lattnereedcd842009-08-31 07:23:46 +0000208
209 bool MadeChange = false;
Chris Lattner6fbe7042010-04-21 00:47:40 +0000210 bool DevirtualizedCall = false;
Fangrui Songf78650a2018-07-30 19:41:25 +0000211
Chris Lattnereedcd842009-08-31 07:23:46 +0000212 // Scan all functions in the SCC.
Chris Lattner4422d312010-04-16 22:42:17 +0000213 unsigned FunctionNo = 0;
214 for (CallGraphSCC::iterator SCCIdx = CurSCC.begin(), E = CurSCC.end();
215 SCCIdx != E; ++SCCIdx, ++FunctionNo) {
216 CallGraphNode *CGN = *SCCIdx;
Chris Lattnereedcd842009-08-31 07:23:46 +0000217 Function *F = CGN->getFunction();
Craig Topper353eda42014-04-24 06:44:33 +0000218 if (!F || F->isDeclaration()) continue;
Fangrui Songf78650a2018-07-30 19:41:25 +0000219
Chris Lattnereedcd842009-08-31 07:23:46 +0000220 // Walk the function body looking for call sites. Sync up the call sites in
221 // CGN with those actually in the function.
Chris Lattner532112b2010-05-01 06:38:43 +0000222
223 // Keep track of the number of direct and indirect calls that were
224 // invalidated and removed.
225 unsigned NumDirectRemoved = 0, NumIndirectRemoved = 0;
Fangrui Songf78650a2018-07-30 19:41:25 +0000226
Chris Lattnereedcd842009-08-31 07:23:46 +0000227 // Get the set of call sites currently in the function.
Duncan Sands5632d962009-09-02 03:48:41 +0000228 for (CallGraphNode::iterator I = CGN->begin(), E = CGN->end(); I != E; ) {
Chris Lattner063d0652009-09-01 06:31:31 +0000229 // If this call site is null, then the function pass deleted the call
Sanjoy Dase6bca0e2017-05-01 17:07:49 +0000230 // entirely and the WeakTrackingVH nulled it out.
Craig Topper353eda42014-04-24 06:44:33 +0000231 if (!I->first ||
Chris Lattner063d0652009-09-01 06:31:31 +0000232 // If we've already seen this call site, then the FunctionPass RAUW'd
233 // one call with another, which resulted in two "uses" in the edge
234 // list of the same call.
235 CallSites.count(I->first) ||
236
Chad Rosier7a20ed72015-04-14 15:52:57 +0000237 // If the call edge is not from a call or invoke, or it is a
Fangrui Songf78650a2018-07-30 19:41:25 +0000238 // instrinsic call, then the function pass RAUW'd a call with
Chad Rosier7a20ed72015-04-14 15:52:57 +0000239 // another value. This can happen when constant folding happens
240 // of well known functions etc.
241 !CallSite(I->first) ||
Sanjoy Dasc65d43e2015-06-18 19:28:26 +0000242 (CallSite(I->first).getCalledFunction() &&
243 CallSite(I->first).getCalledFunction()->isIntrinsic() &&
244 Intrinsic::isLeaf(
245 CallSite(I->first).getCalledFunction()->getIntrinsicID()))) {
Chris Lattnere33167a2009-09-01 18:32:03 +0000246 assert(!CheckingMode &&
247 "CallGraphSCCPass did not update the CallGraph correctly!");
Fangrui Songf78650a2018-07-30 19:41:25 +0000248
Chris Lattner532112b2010-05-01 06:38:43 +0000249 // If this was an indirect call site, count it.
Craig Topper353eda42014-04-24 06:44:33 +0000250 if (!I->second->getFunction())
Chris Lattner532112b2010-05-01 06:38:43 +0000251 ++NumIndirectRemoved;
Fangrui Songf78650a2018-07-30 19:41:25 +0000252 else
Chris Lattner532112b2010-05-01 06:38:43 +0000253 ++NumDirectRemoved;
Fangrui Songf78650a2018-07-30 19:41:25 +0000254
Chris Lattner65fb5972009-09-02 04:39:04 +0000255 // Just remove the edge from the set of callees, keep track of whether
256 // I points to the last element of the vector.
257 bool WasLast = I + 1 == E;
Chris Lattner063d0652009-09-01 06:31:31 +0000258 CGN->removeCallEdge(I);
Fangrui Songf78650a2018-07-30 19:41:25 +0000259
Chris Lattner65fb5972009-09-02 04:39:04 +0000260 // If I pointed to the last element of the vector, we have to bail out:
261 // iterator checking rejects comparisons of the resultant pointer with
262 // end.
263 if (WasLast)
264 break;
Chris Lattner063d0652009-09-01 06:31:31 +0000265 E = CGN->end();
Chris Lattner063d0652009-09-01 06:31:31 +0000266 continue;
267 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000268
Chris Lattner063d0652009-09-01 06:31:31 +0000269 assert(!CallSites.count(I->first) &&
Chris Lattnereedcd842009-08-31 07:23:46 +0000270 "Call site occurs in node multiple times");
Fangrui Songf78650a2018-07-30 19:41:25 +0000271
Sanjay Patel4c219fd2014-11-12 18:25:47 +0000272 CallSite CS(I->first);
273 if (CS) {
274 Function *Callee = CS.getCalledFunction();
275 // Ignore intrinsics because they're not really function calls.
276 if (!Callee || !(Callee->isIntrinsic()))
277 CallSites.insert(std::make_pair(I->first, I->second));
278 }
Chris Lattner3f7b3d12009-09-01 18:13:40 +0000279 ++I;
Chris Lattnereedcd842009-08-31 07:23:46 +0000280 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000281
Chris Lattnereedcd842009-08-31 07:23:46 +0000282 // Loop over all of the instructions in the function, getting the callsites.
Chris Lattner532112b2010-05-01 06:38:43 +0000283 // Keep track of the number of direct/indirect calls added.
284 unsigned NumDirectAdded = 0, NumIndirectAdded = 0;
Benjamin Krameraa209152016-06-26 17:27:42 +0000285
286 for (BasicBlock &BB : *F)
287 for (Instruction &I : BB) {
288 CallSite CS(&I);
Nuno Lopes674acc12012-06-29 17:49:32 +0000289 if (!CS) continue;
290 Function *Callee = CS.getCalledFunction();
291 if (Callee && Callee->isIntrinsic()) continue;
Fangrui Songf78650a2018-07-30 19:41:25 +0000292
Chris Lattnereedcd842009-08-31 07:23:46 +0000293 // If this call site already existed in the callgraph, just verify it
294 // matches up to expectations and remove it from CallSites.
Chris Lattner063d0652009-09-01 06:31:31 +0000295 DenseMap<Value*, CallGraphNode*>::iterator ExistingIt =
Chris Lattnereedcd842009-08-31 07:23:46 +0000296 CallSites.find(CS.getInstruction());
297 if (ExistingIt != CallSites.end()) {
298 CallGraphNode *ExistingNode = ExistingIt->second;
299
300 // Remove from CallSites since we have now seen it.
301 CallSites.erase(ExistingIt);
Fangrui Songf78650a2018-07-30 19:41:25 +0000302
Chris Lattnereedcd842009-08-31 07:23:46 +0000303 // Verify that the callee is right.
304 if (ExistingNode->getFunction() == CS.getCalledFunction())
305 continue;
Fangrui Songf78650a2018-07-30 19:41:25 +0000306
Chris Lattnere33167a2009-09-01 18:32:03 +0000307 // If we are in checking mode, we are not allowed to actually mutate
308 // the callgraph. If this is a case where we can infer that the
309 // callgraph is less precise than it could be (e.g. an indirect call
310 // site could be turned direct), don't reject it in checking mode, and
311 // don't tweak it to be more precise.
312 if (CheckingMode && CS.getCalledFunction() &&
Craig Topper353eda42014-04-24 06:44:33 +0000313 ExistingNode->getFunction() == nullptr)
Chris Lattnere33167a2009-09-01 18:32:03 +0000314 continue;
Fangrui Songf78650a2018-07-30 19:41:25 +0000315
Chris Lattnere33167a2009-09-01 18:32:03 +0000316 assert(!CheckingMode &&
317 "CallGraphSCCPass did not update the CallGraph correctly!");
Fangrui Songf78650a2018-07-30 19:41:25 +0000318
Chris Lattnereedcd842009-08-31 07:23:46 +0000319 // If not, we either went from a direct call to indirect, indirect to
320 // direct, or direct to different direct.
321 CallGraphNode *CalleeNode;
Chris Lattner6fbe7042010-04-21 00:47:40 +0000322 if (Function *Callee = CS.getCalledFunction()) {
Chris Lattnereedcd842009-08-31 07:23:46 +0000323 CalleeNode = CG.getOrInsertFunction(Callee);
Chris Lattner6fbe7042010-04-21 00:47:40 +0000324 // Keep track of whether we turned an indirect call into a direct
325 // one.
Craig Topper353eda42014-04-24 06:44:33 +0000326 if (!ExistingNode->getFunction()) {
Chris Lattner6fbe7042010-04-21 00:47:40 +0000327 DevirtualizedCall = true;
Nicola Zaghend34e60c2018-05-14 12:53:11 +0000328 LLVM_DEBUG(dbgs() << " CGSCCPASSMGR: Devirtualized call to '"
329 << Callee->getName() << "'\n");
Chris Lattner6fbe7042010-04-21 00:47:40 +0000330 }
331 } else {
Chris Lattnereedcd842009-08-31 07:23:46 +0000332 CalleeNode = CG.getCallsExternalNode();
Chris Lattner6fbe7042010-04-21 00:47:40 +0000333 }
Chris Lattner339c82d2009-09-01 20:33:43 +0000334
335 // Update the edge target in CGN.
Chris Lattner055cf262010-04-22 20:42:33 +0000336 CGN->replaceCallEdge(CS, CS, CalleeNode);
Chris Lattnereedcd842009-08-31 07:23:46 +0000337 MadeChange = true;
338 continue;
339 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000340
Chris Lattnere33167a2009-09-01 18:32:03 +0000341 assert(!CheckingMode &&
342 "CallGraphSCCPass did not update the CallGraph correctly!");
343
Chris Lattner532112b2010-05-01 06:38:43 +0000344 // If the call site didn't exist in the CGN yet, add it.
Chris Lattnereedcd842009-08-31 07:23:46 +0000345 CallGraphNode *CalleeNode;
Chris Lattner532112b2010-05-01 06:38:43 +0000346 if (Function *Callee = CS.getCalledFunction()) {
Chris Lattnereedcd842009-08-31 07:23:46 +0000347 CalleeNode = CG.getOrInsertFunction(Callee);
Chris Lattner532112b2010-05-01 06:38:43 +0000348 ++NumDirectAdded;
349 } else {
Chris Lattnereedcd842009-08-31 07:23:46 +0000350 CalleeNode = CG.getCallsExternalNode();
Chris Lattner532112b2010-05-01 06:38:43 +0000351 ++NumIndirectAdded;
352 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000353
Chris Lattnereedcd842009-08-31 07:23:46 +0000354 CGN->addCalledFunction(CS, CalleeNode);
355 MadeChange = true;
356 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000357
Chris Lattner532112b2010-05-01 06:38:43 +0000358 // We scanned the old callgraph node, removing invalidated call sites and
359 // then added back newly found call sites. One thing that can happen is
360 // that an old indirect call site was deleted and replaced with a new direct
361 // call. In this case, we have devirtualized a call, and CGSCCPM would like
362 // to iteratively optimize the new code. Unfortunately, we don't really
363 // have a great way to detect when this happens. As an approximation, we
364 // just look at whether the number of indirect calls is reduced and the
365 // number of direct calls is increased. There are tons of ways to fool this
366 // (e.g. DCE'ing an indirect call and duplicating an unrelated block with a
367 // direct call) but this is close enough.
368 if (NumIndirectRemoved > NumIndirectAdded &&
369 NumDirectRemoved < NumDirectAdded)
370 DevirtualizedCall = true;
Fangrui Songf78650a2018-07-30 19:41:25 +0000371
Chris Lattnereedcd842009-08-31 07:23:46 +0000372 // After scanning this function, if we still have entries in callsites, then
Sanjoy Dase6bca0e2017-05-01 17:07:49 +0000373 // they are dangling pointers. WeakTrackingVH should save us for this, so
374 // abort if
Sanjoy Das2cbeb002017-04-26 16:37:05 +0000375 // this happens.
Chris Lattner063d0652009-09-01 06:31:31 +0000376 assert(CallSites.empty() && "Dangling pointers found in call sites map");
Fangrui Songf78650a2018-07-30 19:41:25 +0000377
Chris Lattner063d0652009-09-01 06:31:31 +0000378 // Periodically do an explicit clear to remove tombstones when processing
379 // large scc's.
Chris Lattner4422d312010-04-16 22:42:17 +0000380 if ((FunctionNo & 15) == 15)
Chris Lattner063d0652009-09-01 06:31:31 +0000381 CallSites.clear();
Chris Lattnereedcd842009-08-31 07:23:46 +0000382 }
383
Nicola Zaghend34e60c2018-05-14 12:53:11 +0000384 LLVM_DEBUG(if (MadeChange) {
385 dbgs() << "CGSCCPASSMGR: Refreshed SCC is now:\n";
386 for (CallGraphNode *CGN : CurSCC)
387 CGN->dump();
388 if (DevirtualizedCall)
389 dbgs() << "CGSCCPASSMGR: Refresh devirtualized a call!\n";
390 } else {
391 dbgs() << "CGSCCPASSMGR: SCC Refresh didn't change call graph.\n";
392 });
Duncan Sandsa41634e2011-08-12 14:54:45 +0000393 (void)MadeChange;
Chris Lattner6fbe7042010-04-21 00:47:40 +0000394
395 return DevirtualizedCall;
396}
397
Sanjay Pateld45a3f12015-03-10 03:48:14 +0000398/// Execute the body of the entire pass manager on the specified SCC.
399/// This keeps track of whether a function pass devirtualizes
Chris Lattner6fbe7042010-04-21 00:47:40 +0000400/// any calls and returns it in DevirtualizedCall.
401bool CGPassManager::RunAllPassesOnSCC(CallGraphSCC &CurSCC, CallGraph &CG,
402 bool &DevirtualizedCall) {
403 bool Changed = false;
Fangrui Songf78650a2018-07-30 19:41:25 +0000404
Sanjay Pateld45a3f12015-03-10 03:48:14 +0000405 // Keep track of whether the callgraph is known to be up-to-date or not.
406 // The CGSSC pass manager runs two types of passes:
Chris Lattner6fbe7042010-04-21 00:47:40 +0000407 // CallGraphSCC Passes and other random function passes. Because other
408 // random function passes are not CallGraph aware, they may clobber the
409 // call graph by introducing new calls or deleting other ones. This flag
410 // is set to false when we run a function pass so that we know to clean up
411 // the callgraph when we need to run a CGSCCPass again.
412 bool CallGraphUpToDate = true;
413
414 // Run all passes on current SCC.
415 for (unsigned PassNo = 0, e = getNumContainedPasses();
416 PassNo != e; ++PassNo) {
417 Pass *P = getContainedPass(PassNo);
Fangrui Songf78650a2018-07-30 19:41:25 +0000418
Chris Lattner6fbe7042010-04-21 00:47:40 +0000419 // If we're in -debug-pass=Executions mode, construct the SCC node list,
420 // otherwise avoid constructing this string as it is expensive.
421 if (isPassDebuggingExecutionsOrMore()) {
422 std::string Functions;
423 #ifndef NDEBUG
424 raw_string_ostream OS(Functions);
425 for (CallGraphSCC::iterator I = CurSCC.begin(), E = CurSCC.end();
426 I != E; ++I) {
427 if (I != CurSCC.begin()) OS << ", ";
428 (*I)->print(OS);
429 }
430 OS.flush();
431 #endif
432 dumpPassInfo(P, EXECUTION_MSG, ON_CG_MSG, Functions);
433 }
434 dumpRequiredSet(P);
Fangrui Songf78650a2018-07-30 19:41:25 +0000435
Chris Lattner6fbe7042010-04-21 00:47:40 +0000436 initializeAnalysisImpl(P);
Fangrui Songf78650a2018-07-30 19:41:25 +0000437
Chris Lattner6fbe7042010-04-21 00:47:40 +0000438 // Actually run this pass on the current SCC.
439 Changed |= RunPassOnSCC(P, CurSCC, CG,
440 CallGraphUpToDate, DevirtualizedCall);
Fangrui Songf78650a2018-07-30 19:41:25 +0000441
Chris Lattner6fbe7042010-04-21 00:47:40 +0000442 if (Changed)
443 dumpPassInfo(P, MODIFICATION_MSG, ON_CG_MSG, "");
444 dumpPreservedSet(P);
Fangrui Songf78650a2018-07-30 19:41:25 +0000445
446 verifyPreservedAnalysis(P);
Chris Lattner6fbe7042010-04-21 00:47:40 +0000447 removeNotPreservedAnalysis(P);
448 recordAvailableAnalysis(P);
449 removeDeadPasses(P, "", ON_CG_MSG);
450 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000451
Chris Lattner6fbe7042010-04-21 00:47:40 +0000452 // If the callgraph was left out of date (because the last pass run was a
453 // functionpass), refresh it before we move on to the next SCC.
454 if (!CallGraphUpToDate)
455 DevirtualizedCall |= RefreshCallGraph(CurSCC, CG, false);
456 return Changed;
Chris Lattnereedcd842009-08-31 07:23:46 +0000457}
Chris Lattner7e4fbdd2009-08-31 06:01:21 +0000458
Sanjay Pateld45a3f12015-03-10 03:48:14 +0000459/// Execute all of the passes scheduled for execution. Keep track of
Devang Patel48537a02007-01-17 21:45:01 +0000460/// whether any of the passes modifies the module, and if so, return true.
461bool CGPassManager::runOnModule(Module &M) {
Chandler Carruth6378cf52013-11-26 04:19:30 +0000462 CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph();
Bill Wendling5f14a012009-02-11 18:19:24 +0000463 bool Changed = doInitialization(CG);
Fangrui Songf78650a2018-07-30 19:41:25 +0000464
Evgeniy Stepanovca8c2f72018-07-13 16:32:31 +0000465 // Walk the callgraph in bottom-up SCC order.
466 scc_iterator<CallGraph*> CGI = scc_begin(&CG);
Chris Lattner5518b812010-04-16 22:59:24 +0000467
Evgeniy Stepanovca8c2f72018-07-13 16:32:31 +0000468 CallGraphSCC CurSCC(CG, &CGI);
469 while (!CGI.isAtEnd()) {
470 // Copy the current SCC and increment past it so that the pass can hack
471 // on the SCC if it wants to without invalidating our iterator.
472 const std::vector<CallGraphNode *> &NodeVec = *CGI;
473 CurSCC.initialize(NodeVec);
474 ++CGI;
Yaron Kerenafe39832015-07-02 14:17:12 +0000475
Evgeniy Stepanovca8c2f72018-07-13 16:32:31 +0000476 // At the top level, we run all the passes in this pass manager on the
477 // functions in this SCC. However, we support iterative compilation in the
478 // case where a function pass devirtualizes a call to a function. For
479 // example, it is very common for a function pass (often GVN or instcombine)
480 // to eliminate the addressing that feeds into a call. With that improved
481 // information, we would like the call to be an inline candidate, infer
482 // mod-ref information etc.
483 //
484 // Because of this, we allow iteration up to a specified iteration count.
485 // This only happens in the case of a devirtualized call, so we only burn
486 // compile time in the case that we're making progress. We also have a hard
487 // iteration count limit in case there is crazy code.
488 unsigned Iteration = 0;
489 bool DevirtualizedCall = false;
490 do {
491 LLVM_DEBUG(if (Iteration) dbgs()
492 << " SCCPASSMGR: Re-visiting SCC, iteration #" << Iteration
493 << '\n');
494 DevirtualizedCall = false;
495 Changed |= RunAllPassesOnSCC(CurSCC, CG, DevirtualizedCall);
496 } while (Iteration++ < MaxIterations && DevirtualizedCall);
Fangrui Songf78650a2018-07-30 19:41:25 +0000497
Evgeniy Stepanovca8c2f72018-07-13 16:32:31 +0000498 if (DevirtualizedCall)
499 LLVM_DEBUG(dbgs() << " CGSCCPASSMGR: Stopped iteration after "
500 << Iteration
501 << " times, due to -max-cg-scc-iterations\n");
Craig Topper8a950272017-05-18 00:51:39 +0000502
Evgeniy Stepanovca8c2f72018-07-13 16:32:31 +0000503 MaxSCCIterations.updateMax(Iteration);
Devang Patel48537a02007-01-17 21:45:01 +0000504 }
Bill Wendling5f14a012009-02-11 18:19:24 +0000505 Changed |= doFinalization(CG);
Devang Patel48537a02007-01-17 21:45:01 +0000506 return Changed;
507}
508
509/// Initialize CG
Bill Wendling5f14a012009-02-11 18:19:24 +0000510bool CGPassManager::doInitialization(CallGraph &CG) {
Devang Patel48537a02007-01-17 21:45:01 +0000511 bool Changed = false;
Fangrui Songf78650a2018-07-30 19:41:25 +0000512 for (unsigned i = 0, e = getNumContainedPasses(); i != e; ++i) {
Chris Lattner0b1c7232010-01-22 05:46:59 +0000513 if (PMDataManager *PM = getContainedPass(i)->getAsPMDataManager()) {
514 assert(PM->getPassManagerType() == PMT_FunctionPassManager &&
515 "Invalid CGPassManager member");
516 Changed |= ((FPPassManager*)PM)->doInitialization(CG.getModule());
Nick Lewyckycdccffe2009-02-13 07:15:53 +0000517 } else {
Chris Lattner0b1c7232010-01-22 05:46:59 +0000518 Changed |= ((CallGraphSCCPass*)getContainedPass(i))->doInitialization(CG);
Nick Lewyckycdccffe2009-02-13 07:15:53 +0000519 }
Devang Patel48537a02007-01-17 21:45:01 +0000520 }
521 return Changed;
522}
523
524/// Finalize CG
Bill Wendling5f14a012009-02-11 18:19:24 +0000525bool CGPassManager::doFinalization(CallGraph &CG) {
Devang Patel48537a02007-01-17 21:45:01 +0000526 bool Changed = false;
Fangrui Songf78650a2018-07-30 19:41:25 +0000527 for (unsigned i = 0, e = getNumContainedPasses(); i != e; ++i) {
Chris Lattner0b1c7232010-01-22 05:46:59 +0000528 if (PMDataManager *PM = getContainedPass(i)->getAsPMDataManager()) {
529 assert(PM->getPassManagerType() == PMT_FunctionPassManager &&
530 "Invalid CGPassManager member");
531 Changed |= ((FPPassManager*)PM)->doFinalization(CG.getModule());
Nick Lewyckycdccffe2009-02-13 07:15:53 +0000532 } else {
Chris Lattner0b1c7232010-01-22 05:46:59 +0000533 Changed |= ((CallGraphSCCPass*)getContainedPass(i))->doFinalization(CG);
Nick Lewyckycdccffe2009-02-13 07:15:53 +0000534 }
Devang Patel48537a02007-01-17 21:45:01 +0000535 }
536 return Changed;
537}
538
Chris Lattner6d1208f2010-04-16 21:43:55 +0000539//===----------------------------------------------------------------------===//
Chris Lattner4422d312010-04-16 22:42:17 +0000540// CallGraphSCC Implementation
541//===----------------------------------------------------------------------===//
542
Sanjay Pateld45a3f12015-03-10 03:48:14 +0000543/// This informs the SCC and the pass manager that the specified
Chris Lattner5518b812010-04-16 22:59:24 +0000544/// Old node has been deleted, and New is to be used in its place.
545void CallGraphSCC::ReplaceNode(CallGraphNode *Old, CallGraphNode *New) {
546 assert(Old != New && "Should not replace node with self");
547 for (unsigned i = 0; ; ++i) {
548 assert(i != Nodes.size() && "Node not in SCC");
549 if (Nodes[i] != Old) continue;
550 Nodes[i] = New;
551 break;
552 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000553
Chris Lattnerde023a32010-04-16 23:04:30 +0000554 // Update the active scc_iterator so that it doesn't contain dangling
555 // pointers to the old CallGraphNode.
556 scc_iterator<CallGraph*> *CGI = (scc_iterator<CallGraph*>*)Context;
557 CGI->ReplaceNode(Old, New);
Chris Lattner5518b812010-04-16 22:59:24 +0000558}
Chris Lattner4422d312010-04-16 22:42:17 +0000559
Chris Lattner4422d312010-04-16 22:42:17 +0000560//===----------------------------------------------------------------------===//
Chris Lattner6d1208f2010-04-16 21:43:55 +0000561// CallGraphSCCPass Implementation
562//===----------------------------------------------------------------------===//
David Greene9b063df2010-04-02 23:17:14 +0000563
Devang Patel020f4f22007-01-23 21:55:17 +0000564/// Assign pass manager to manage this pass.
Devang Patel1f8200b2007-01-23 21:52:35 +0000565void CallGraphSCCPass::assignPassManager(PMStack &PMS,
Anton Korobeynikovfb801512007-04-16 18:10:23 +0000566 PassManagerType PreferredType) {
Fangrui Songf78650a2018-07-30 19:41:25 +0000567 // Find CGPassManager
Duncan Sands60f28bf2007-07-19 09:42:01 +0000568 while (!PMS.empty() &&
569 PMS.top()->getPassManagerType() > PMT_CallGraphPassManager)
570 PMS.pop();
Devang Patel1f8200b2007-01-23 21:52:35 +0000571
Chris Lattner9efd4fc2010-01-22 05:37:10 +0000572 assert(!PMS.empty() && "Unable to handle Call Graph Pass");
573 CGPassManager *CGP;
Fangrui Songf78650a2018-07-30 19:41:25 +0000574
Chris Lattner9efd4fc2010-01-22 05:37:10 +0000575 if (PMS.top()->getPassManagerType() == PMT_CallGraphPassManager)
576 CGP = (CGPassManager*)PMS.top();
577 else {
Fangrui Songf78650a2018-07-30 19:41:25 +0000578 // Create new Call Graph SCC Pass Manager if it does not exist.
Chris Lattner9efd4fc2010-01-22 05:37:10 +0000579 assert(!PMS.empty() && "Unable to create Call Graph Pass Manager");
Devang Patel1f8200b2007-01-23 21:52:35 +0000580 PMDataManager *PMD = PMS.top();
581
582 // [1] Create new Call Graph Pass Manager
Andrew Trick08966212011-08-29 17:07:00 +0000583 CGP = new CGPassManager();
Devang Patel1f8200b2007-01-23 21:52:35 +0000584
585 // [2] Set up new manager's top level manager
586 PMTopLevelManager *TPM = PMD->getTopLevelManager();
587 TPM->addIndirectPassManager(CGP);
588
589 // [3] Assign manager to manage this new manager. This may create
590 // and push new managers into PMS
Chris Lattner9efd4fc2010-01-22 05:37:10 +0000591 Pass *P = CGP;
Devang Patel703de8f2007-06-21 22:29:02 +0000592 TPM->schedulePass(P);
Devang Patel1f8200b2007-01-23 21:52:35 +0000593
594 // [4] Push new manager into PMS
595 PMS.push(CGP);
596 }
597
598 CGP->add(this);
599}
600
Sanjay Pateld45a3f12015-03-10 03:48:14 +0000601/// For this class, we declare that we require and preserve the call graph.
602/// If the derived class implements this method, it should
Chris Lattnerf7e95942003-08-31 01:54:59 +0000603/// always explicitly call the implementation here.
604void CallGraphSCCPass::getAnalysisUsage(AnalysisUsage &AU) const {
Chandler Carruth6378cf52013-11-26 04:19:30 +0000605 AU.addRequired<CallGraphWrapperPass>();
606 AU.addPreserved<CallGraphWrapperPass>();
Chris Lattnerf7e95942003-08-31 01:54:59 +0000607}
Chris Lattner6d1208f2010-04-16 21:43:55 +0000608
Chris Lattner6d1208f2010-04-16 21:43:55 +0000609//===----------------------------------------------------------------------===//
610// PrintCallGraphPass Implementation
611//===----------------------------------------------------------------------===//
612
613namespace {
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000614
Chris Lattner6d1208f2010-04-16 21:43:55 +0000615 /// PrintCallGraphPass - Print a Module corresponding to a call graph.
616 ///
617 class PrintCallGraphPass : public CallGraphSCCPass {
618 std::string Banner;
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000619 raw_ostream &OS; // raw_ostream to print on.
Fangrui Songf78650a2018-07-30 19:41:25 +0000620
Chris Lattner6d1208f2010-04-16 21:43:55 +0000621 public:
622 static char ID;
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000623
624 PrintCallGraphPass(const std::string &B, raw_ostream &OS)
625 : CallGraphSCCPass(ID), Banner(B), OS(OS) {}
Craig Toppere9ba7592014-03-05 07:30:04 +0000626
627 void getAnalysisUsage(AnalysisUsage &AU) const override {
Chris Lattner6d1208f2010-04-16 21:43:55 +0000628 AU.setPreservesAll();
629 }
Craig Toppere9ba7592014-03-05 07:30:04 +0000630
631 bool runOnSCC(CallGraphSCC &SCC) override {
Yaron Keren7d463922017-06-12 02:18:50 +0000632 bool BannerPrinted = false;
Mehdi Amini062b3fe2017-01-18 21:37:11 +0000633 auto PrintBannerOnce = [&] () {
Mehdi Amini062b3fe2017-01-18 21:37:11 +0000634 if (BannerPrinted)
635 return;
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000636 OS << Banner;
Mehdi Amini062b3fe2017-01-18 21:37:11 +0000637 BannerPrinted = true;
638 };
Sanjay Patelc6012542015-03-10 03:26:39 +0000639 for (CallGraphNode *CGN : SCC) {
Yaron Keren7d463922017-06-12 02:18:50 +0000640 if (Function *F = CGN->getFunction()) {
641 if (!F->isDeclaration() && isFunctionInPrintList(F->getName())) {
Mehdi Amini062b3fe2017-01-18 21:37:11 +0000642 PrintBannerOnce();
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000643 F->print(OS);
Mehdi Amini062b3fe2017-01-18 21:37:11 +0000644 }
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000645 } else if (isFunctionInPrintList("*")) {
Mehdi Amini062b3fe2017-01-18 21:37:11 +0000646 PrintBannerOnce();
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000647 OS << "\nPrinting <null> Function\n";
Mehdi Amini062b3fe2017-01-18 21:37:11 +0000648 }
Richard Trieua23043c2014-06-09 22:53:16 +0000649 }
Chris Lattner6d1208f2010-04-16 21:43:55 +0000650 return false;
651 }
Fangrui Songf78650a2018-07-30 19:41:25 +0000652
Yaron Keren1de47922017-03-10 07:09:20 +0000653 StringRef getPassName() const override { return "Print CallGraph IR"; }
Chris Lattner6d1208f2010-04-16 21:43:55 +0000654 };
Fangrui Songf78650a2018-07-30 19:41:25 +0000655
Chris Lattner6d1208f2010-04-16 21:43:55 +0000656} // end anonymous namespace.
657
658char PrintCallGraphPass::ID = 0;
659
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000660Pass *CallGraphSCCPass::createPrinterPass(raw_ostream &OS,
Chris Lattner6d1208f2010-04-16 21:43:55 +0000661 const std::string &Banner) const {
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000662 return new PrintCallGraphPass(Banner, OS);
Chris Lattner6d1208f2010-04-16 21:43:55 +0000663}
664
Andrew Kayloraa641a52016-04-22 22:06:11 +0000665bool CallGraphSCCPass::skipSCC(CallGraphSCC &SCC) const {
666 return !SCC.getCallGraph().getModule()
667 .getContext()
Fedor Sergeev98014e42018-03-27 16:57:20 +0000668 .getOptPassGate()
Andrew Kayloraa641a52016-04-22 22:06:11 +0000669 .shouldRunPass(this, SCC);
670}
Mehdi Aminibbacddf2016-06-10 16:19:46 +0000671
672char DummyCGSCCPass::ID = 0;
Eugene Zelenkofa6434b2017-08-31 21:56:16 +0000673
Mehdi Aminibbacddf2016-06-10 16:19:46 +0000674INITIALIZE_PASS(DummyCGSCCPass, "DummyCGSCCPass", "DummyCGSCCPass", false,
675 false)