[llvm] cee9869 - [opt] Add helpful alternatives for -analyze under new PM

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 14:09:28 PST 2021


Author: Arthur Eubanks
Date: 2021-02-10T14:09:17-08:00
New Revision: cee9869c4e6efe4897c71a17590e990d248131b3

URL: https://github.com/llvm/llvm-project/commit/cee9869c4e6efe4897c71a17590e990d248131b3
DIFF: https://github.com/llvm/llvm-project/commit/cee9869c4e6efe4897c71a17590e990d248131b3.diff

LOG: [opt] Add helpful alternatives for -analyze under new PM

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D96449

Added: 
    

Modified: 
    llvm/tools/opt/opt.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index a5b50582d0ac..cb24336f0406 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -762,7 +762,10 @@ int main(int argc, char **argv) {
   if ((EnableNewPassManager && !shouldForceLegacyPM()) ||
       PassPipeline.getNumOccurrences() > 0) {
     if (AnalyzeOnly) {
-      errs() << "Cannot specify -analyze under new pass manager\n";
+      errs() << "Cannot specify -analyze under new pass manager, either "
+                "specify '-enable-new-pm=0', or use the corresponding new pass "
+                "manager pass, e.g. '-passes=print<scalar-evolution>'. For a "
+                "full list of passes, see the '--print-passes' flag.\n";
       return 1;
     }
     if (PassPipeline.getNumOccurrences() > 0 && PassList.size() > 0) {


        


More information about the llvm-commits mailing list