[PATCH] D152122: Set isRequired true for CFGViewer/CFGPrinter passes
Wenju He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 4 22:07:57 PDT 2023
wenju created this revision.
wenju added a reviewer: MaskRay.
Herald added a project: All.
wenju requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This PR allows function's cfg to be viewed/printed even if the function
has optnone attribute.
https://reviews.llvm.org/D152122
Files:
llvm/include/llvm/Analysis/CFGPrinter.h
Index: llvm/include/llvm/Analysis/CFGPrinter.h
===================================================================
--- llvm/include/llvm/Analysis/CFGPrinter.h
+++ llvm/include/llvm/Analysis/CFGPrinter.h
@@ -35,21 +35,25 @@
class CFGViewerPass : public PassInfoMixin<CFGViewerPass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
+ static bool isRequired() { return true; }
};
class CFGOnlyViewerPass : public PassInfoMixin<CFGOnlyViewerPass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
+ static bool isRequired() { return true; }
};
class CFGPrinterPass : public PassInfoMixin<CFGPrinterPass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
+ static bool isRequired() { return true; }
};
class CFGOnlyPrinterPass : public PassInfoMixin<CFGOnlyPrinterPass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
+ static bool isRequired() { return true; }
};
class DOTFuncInfo {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152122.528275.patch
Type: text/x-patch
Size: 1020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230605/7b689508/attachment.bin>
More information about the llvm-commits
mailing list