[llvm] ca76d6e - [Bugpoint][NewPM] Pin bugpoint to legacy PM

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 11:29:28 PDT 2020


Author: Arthur Eubanks
Date: 2020-09-15T11:29:10-07:00
New Revision: ca76d6e94a30b8fe11a63d3a55d3903c7cd25b5d

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

LOG: [Bugpoint][NewPM] Pin bugpoint to legacy PM

Bugpoint has lots of assumptions and hacks around the legacy PM, put off migrating it to NPM until later.
Fixes tests under BugPoint under NPM.

Reviewed By: arsenm

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

Added: 
    

Modified: 
    llvm/test/BugPoint/unsymbolized.ll
    llvm/tools/bugpoint/OptimizerDriver.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/test/BugPoint/unsymbolized.ll b/llvm/test/BugPoint/unsymbolized.ll
index d2060ddee168..55aadc35884c 100644
--- a/llvm/test/BugPoint/unsymbolized.ll
+++ b/llvm/test/BugPoint/unsymbolized.ll
@@ -3,7 +3,7 @@
 ; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py
 ; RUN: echo "exit(1)" >> %t.py
 ; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%python -opt-args %t.py | FileCheck %s
-; RUN: not --crash opt -load %llvmshlibdir/BugpointPasses%shlibext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s
+; RUN: not --crash opt -enable-new-pm=0 -load %llvmshlibdir/BugpointPasses%shlibext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s
 ; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%t.non.existent.opt.binary -opt-args %t.py 2>&1 | FileCheck %s --check-prefix=BAD-OPT
 
 ; Test that bugpoint disables symbolication on the opt tool to reduce runtime overhead when opt crashes

diff  --git a/llvm/tools/bugpoint/OptimizerDriver.cpp b/llvm/tools/bugpoint/OptimizerDriver.cpp
index 25a970bd6878..ca78735202fc 100644
--- a/llvm/tools/bugpoint/OptimizerDriver.cpp
+++ b/llvm/tools/bugpoint/OptimizerDriver.cpp
@@ -205,6 +205,9 @@ bool BugDriver::runPasses(Module &Program,
 
   for (unsigned i = 0, e = OptArgs.size(); i != e; ++i)
     Args.push_back(OptArgs[i]);
+  // Pin to legacy PM since bugpoint has lots of infra and hacks revolving
+  // around the legacy PM.
+  Args.push_back("-enable-new-pm=0");
   Args.push_back("-disable-symbolication");
   Args.push_back("-o");
   Args.push_back(OutputFilename);


        


More information about the llvm-commits mailing list