@@ -152,37 +152,6 @@ PreservedAnalyses CFGPrinterPass::run(Function &F,
152
152
return PreservedAnalyses::all ();
153
153
}
154
154
155
- namespace {
156
- struct CFGOnlyPrinterLegacyPass : public FunctionPass {
157
- static char ID; // Pass identification, replacement for typeid
158
- CFGOnlyPrinterLegacyPass () : FunctionPass(ID) {
159
- initializeCFGOnlyPrinterLegacyPassPass (*PassRegistry::getPassRegistry ());
160
- }
161
-
162
- bool runOnFunction (Function &F) override {
163
- if (!CFGFuncName.empty () && !F.getName ().contains (CFGFuncName))
164
- return false ;
165
- auto *BPI = &getAnalysis<BranchProbabilityInfoWrapperPass>().getBPI ();
166
- auto *BFI = &getAnalysis<BlockFrequencyInfoWrapperPass>().getBFI ();
167
- writeCFGToDotFile (F, BFI, BPI, getMaxFreq (F, BFI), /* CFGOnly=*/ true );
168
- return false ;
169
- }
170
- void print (raw_ostream &OS, const Module * = nullptr ) const override {}
171
-
172
- void getAnalysisUsage (AnalysisUsage &AU) const override {
173
- FunctionPass::getAnalysisUsage (AU);
174
- AU.addRequired <BlockFrequencyInfoWrapperPass>();
175
- AU.addRequired <BranchProbabilityInfoWrapperPass>();
176
- AU.setPreservesAll ();
177
- }
178
- };
179
- } // namespace
180
-
181
- char CFGOnlyPrinterLegacyPass::ID = 0 ;
182
- INITIALIZE_PASS (CFGOnlyPrinterLegacyPass, " dot-cfg-only" ,
183
- " Print CFG of function to 'dot' file (with no function bodies)" ,
184
- false , true )
185
-
186
155
PreservedAnalyses CFGOnlyPrinterPass::run (Function &F,
187
156
FunctionAnalysisManager &AM) {
188
157
if (!CFGFuncName.empty () && !F.getName ().contains (CFGFuncName))
@@ -224,10 +193,6 @@ FunctionPass *llvm::createCFGPrinterLegacyPassPass() {
224
193
return new CFGPrinterLegacyPass ();
225
194
}
226
195
227
- FunctionPass *llvm::createCFGOnlyPrinterLegacyPassPass () {
228
- return new CFGOnlyPrinterLegacyPass ();
229
- }
230
-
231
196
// / Find all blocks on the paths which terminate with a deoptimize or
232
197
// / unreachable (i.e. all blocks which are post-dominated by a deoptimize
233
198
// / or unreachable). These paths are hidden if the corresponding cl::opts
0 commit comments