Skip to content

Commit 0a17664

Browse files
committed
Revert "[LTO] Add option enable NewPM with LTOCodeGenerator."
This reverts commit 7a6a2cc because it is causing failures on green dragon.
1 parent b0a8e41 commit 0a17664

File tree

6 files changed

+12
-35
lines changed

6 files changed

+12
-35
lines changed

llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ struct LTOCodeGenerator {
186186

187187
void setDisableVerify(bool Value) { DisableVerify = Value; }
188188

189-
void setUseNewPM(bool Value) { UseNewPM = Value; }
190-
191189
void setDiagnosticHandler(lto_diagnostic_handler_t, void *);
192190

193191
LLVMContext &getContext() { return Context; }
@@ -248,7 +246,6 @@ struct LTOCodeGenerator {
248246
bool Freestanding = false;
249247
std::unique_ptr<ToolOutputFile> StatsFile = nullptr;
250248
bool DisableVerify = false;
251-
bool UseNewPM = LLVM_ENABLE_NEW_PASS_MANAGER;
252249
};
253250
}
254251
#endif

llvm/lib/LTO/LTOCodeGenerator.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ lto::Config LTOCodeGenerator::toConfig() const {
145145
Conf.PreCodeGenPassesHook = [](legacy::PassManager &PM) {
146146
PM.add(createObjCARCContractPass());
147147
};
148-
Conf.UseNewPM = UseNewPM;
149148

150149
return Conf;
151150
}

llvm/test/LTO/X86/diagnostic-handler-remarks.ll

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,35 @@
11
; RUN: llvm-as < %s >%t.bc
22
; PR21108: Diagnostic handlers get pass remarks, even if they're not enabled.
33

4-
; FIXME: Update checks for new pass manager.
5-
64
; Confirm that there are -pass-remarks.
7-
; RUN: llvm-lto -use-new-pm=false \
8-
; RUN: -pass-remarks=inline \
5+
; RUN: llvm-lto -pass-remarks=inline \
96
; RUN: -exported-symbol _func2 -pass-remarks-analysis=loop-vectorize \
107
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
118
; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS
129
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
1310

14-
; RUN: llvm-lto -use-new-pm=false \
15-
; RUN: -pass-remarks=inline -use-diagnostic-handler \
11+
; RUN: llvm-lto -pass-remarks=inline -use-diagnostic-handler \
1612
; RUN: -exported-symbol _func2 -pass-remarks-analysis=loop-vectorize \
17-
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
13+
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
1814
; RUN: FileCheck %s -allow-empty -check-prefix=REMARKS_DH
1915
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
2016

2117
; Confirm that -pass-remarks are not printed by default.
22-
; RUN: llvm-lto -use-new-pm=false \
18+
; RUN: llvm-lto \
2319
; RUN: -exported-symbol _func2 \
2420
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
2521
; RUN: FileCheck %s -allow-empty
2622
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
2723

28-
; RUN: llvm-lto -use-new-pm=false \
29-
; RUN: -use-diagnostic-handler \
30-
; RUN: -exported-symbol _func2 \
31-
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
24+
; RUN: llvm-lto -use-diagnostic-handler \
25+
; RUN: -exported-symbol _func2 \
26+
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
3227
; RUN: FileCheck %s -allow-empty
3328
; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
3429

3530
; Optimization records are collected regardless of the diagnostic handler
3631
; RUN: rm -f %t.yaml
37-
; RUN: llvm-lto -use-new-pm=false \
38-
; RUN: -lto-pass-remarks-output=%t.yaml \
32+
; RUN: llvm-lto -lto-pass-remarks-output=%t.yaml \
3933
; RUN: -exported-symbol _func2 \
4034
; RUN: -exported-symbol _main -o %t.o %t.bc 2>&1 | \
4135
; RUN: FileCheck %s -allow-empty

llvm/test/LTO/X86/disable-verify.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
; RUN: llvm-as < %s >%t.bc
2-
; RUN: llvm-lto -use-new-pm=false -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
3-
; RUN: llvm-lto -use-new-pm=false -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 | FileCheck %s -check-prefix=VERIFY
4-
5-
; FIXME: Update checks for new pass manager.
2+
; RUN: llvm-lto -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
3+
; RUN: llvm-lto -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 | FileCheck %s -check-prefix=VERIFY
64

75
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
86
target triple = "x86_64-apple-macosx10.10.0"

llvm/test/Other/X86/lto-hot-cold-split.ll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
; RUN: opt -module-summary %s -o %t.bc
2-
; RUN: llvm-lto -use-new-pm=false -hot-cold-split=true \
3-
; RUN: -thinlto-action=run %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
4-
; RUN: llvm-lto -use-new-pm=false -hot-cold-split=true \
5-
; RUN: %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
6-
7-
; FIXME: Update checks for new pass manager.
2+
; RUN: llvm-lto -hot-cold-split=true -thinlto-action=run %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
3+
; RUN: llvm-lto -hot-cold-split=true %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
84

95
; REQUIRES: asserts
106

llvm/tools/llvm-lto/llvm-lto.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,6 @@ static cl::opt<bool> PrintMachOCPUOnly(
222222
"print-macho-cpu-only", cl::init(false),
223223
cl::desc("Instead of running LTO, print the mach-o cpu in each IR file"));
224224

225-
static cl::opt<bool>
226-
UseNewPM("use-new-pm",
227-
cl::desc("Run LTO passes using the new pass manager"),
228-
cl::init(LLVM_ENABLE_NEW_PASS_MANAGER), cl::Hidden);
229-
230225
namespace {
231226

232227
struct ModuleInfo {
@@ -1019,8 +1014,6 @@ int main(int argc, char **argv) {
10191014
CodeGen.setOptLevel(OptLevel - '0');
10201015
CodeGen.setAttrs(codegen::getMAttrs());
10211016

1022-
CodeGen.setUseNewPM(UseNewPM);
1023-
10241017
if (auto FT = codegen::getExplicitFileType())
10251018
CodeGen.setFileType(FT.getValue());
10261019

0 commit comments

Comments
 (0)