Skip to content

Commit b9d08a8

Browse files
committed
review
1 parent 660cfbe commit b9d08a8

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

llvm/lib/Passes/PassRegistry.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,13 @@ MODULE_PASS_WITH_PARAMS(
261261
MODULE_PASS_WITH_PARAMS(
262262
"lto-pre-link", "", [&](OptimizationLevel L) {
263263
setupOptionsForPipelineAlias(PTO, L);
264-
if (PTO.UnifiedLTO)
264+
if (PTO.UnifiedLTO) {
265265
// When UnifiedLTO is enabled, use the ThinLTO pre-link pipeline. This
266266
// avoids compile-time performance regressions and keeps the pre-link
267267
// LTO pipeline "unified" for both LTO modes.
268268
return buildThinLTOPreLinkDefaultPipeline(L);
269-
else
270-
return buildLTOPreLinkDefaultPipeline(L);
269+
}
270+
return buildLTOPreLinkDefaultPipeline(L);
271271
},
272272
parseOptLevelParam, "O0;O1;O2;O3;Os;Oz")
273273
MODULE_PASS_WITH_PARAMS(
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
; RUN: not opt -passes="default" < %s 2>&1 | FileCheck %s --check-prefix=MISSING-OPT-LEVEL
22
; RUN: not opt -passes="default<foo>" < %s 2>&1 | FileCheck %s --check-prefix=INVALID-OPT-LEVEL
3+
; RUN: not opt -passes="thinlto-pre-link" < %s 2>&1 | FileCheck %s --check-prefix=MISSING-OPT-LEVEL
4+
; RUN: not opt -passes="thinlto-pre-link<foo>" < %s 2>&1 | FileCheck %s --check-prefix=INVALID-OPT-LEVEL
5+
; RUN: not opt -passes="thinlto" < %s 2>&1 | FileCheck %s --check-prefix=MISSING-OPT-LEVEL
6+
; RUN: not opt -passes="thinlto<foo>" < %s 2>&1 | FileCheck %s --check-prefix=INVALID-OPT-LEVEL
7+
; RUN: not opt -passes="lto-pre-link" < %s 2>&1 | FileCheck %s --check-prefix=MISSING-OPT-LEVEL
8+
; RUN: not opt -passes="lto-pre-link<foo>" < %s 2>&1 | FileCheck %s --check-prefix=INVALID-OPT-LEVEL
9+
; RUN: not opt -passes="lto" < %s 2>&1 | FileCheck %s --check-prefix=MISSING-OPT-LEVEL
10+
; RUN: not opt -passes="lto<foo>" < %s 2>&1 | FileCheck %s --check-prefix=INVALID-OPT-LEVEL
311

412
; MISSING-OPT-LEVEL: invalid optimization level ''
513
; INVALID-OPT-LEVEL: invalid optimization level 'foo'

0 commit comments

Comments
 (0)