Skip to content

Commit ca76d6e

Browse files
committed
[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
1 parent 0513487 commit ca76d6e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llvm/test/BugPoint/unsymbolized.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py
44
; RUN: echo "exit(1)" >> %t.py
55
; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%python -opt-args %t.py | FileCheck %s
6-
; RUN: not --crash opt -load %llvmshlibdir/BugpointPasses%shlibext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s
6+
; RUN: not --crash opt -enable-new-pm=0 -load %llvmshlibdir/BugpointPasses%shlibext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s
77
; 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
88

99
; Test that bugpoint disables symbolication on the opt tool to reduce runtime overhead when opt crashes

llvm/tools/bugpoint/OptimizerDriver.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ bool BugDriver::runPasses(Module &Program,
205205

206206
for (unsigned i = 0, e = OptArgs.size(); i != e; ++i)
207207
Args.push_back(OptArgs[i]);
208+
// Pin to legacy PM since bugpoint has lots of infra and hacks revolving
209+
// around the legacy PM.
210+
Args.push_back("-enable-new-pm=0");
208211
Args.push_back("-disable-symbolication");
209212
Args.push_back("-o");
210213
Args.push_back(OutputFilename);

0 commit comments

Comments
 (0)