[PATCH] D101664: [NewPM] Disable RelLookupTableConverter pass in lto
Gulfem Savrun Yeniceri via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 30 14:00:05 PDT 2021
gulfem created this revision.
Herald added subscribers: hiraditya, inglorion.
gulfem requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Relative look table converter pass caused an issue when full lto
is enabled (reported in https://reviews.llvm.org/D94355).
This patch disables that pass from full lto pre-link phase optimization
pipeline until the issue is fixed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101664
Files:
llvm/lib/Passes/PassBuilder.cpp
llvm/test/Other/new-pm-defaults.ll
Index: llvm/test/Other/new-pm-defaults.ll
===================================================================
--- llvm/test/Other/new-pm-defaults.ll
+++ llvm/test/Other/new-pm-defaults.ll
@@ -260,8 +260,10 @@
; CHECK-O-NEXT: Running pass: CGProfilePass
; CHECK-O-NEXT: Running pass: GlobalDCEPass
; CHECK-O-NEXT: Running pass: ConstantMergePass
-; CHECK-O-NEXT: Running pass: RelLookupTableConverterPass
-; CHECK-O-NEXT: Running analysis: TargetIRAnalysis
+; CHECK-DEFAULT-NEXT: Running pass: RelLookupTableConverterPass
+; CHECK-LTO-NOT: Running pass: RelLookupTableConverterPass
+; CHECK-DEFAULT-NEXT: Running analysis: TargetIRAnalysis
+; CHECK-LTO-NOT: Running analysis: TargetIRAnalysis
; CHECK-O-NEXT: Running pass: AnnotationRemarksPass on foo
; CHECK-LTO-NEXT: Running pass: CanonicalizeAliasesPass
; CHECK-LTO-NEXT: Running pass: NameAnonGlobalPass
Index: llvm/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/lib/Passes/PassBuilder.cpp
+++ llvm/lib/Passes/PassBuilder.cpp
@@ -1425,7 +1425,11 @@
MPM.addPass(GlobalDCEPass());
MPM.addPass(ConstantMergePass());
- MPM.addPass(RelLookupTableConverterPass());
+ // TODO: Relative look table converter pass caused an issue when full lto is
+ // enabled. See https://reviews.llvm.org/D94355 for more details.
+ // Until the issue fixed, disable this pass during pre-linking phase.
+ if (!LTOPreLink)
+ MPM.addPass(RelLookupTableConverterPass());
return MPM;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101664.342030.patch
Type: text/x-patch
Size: 1496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210430/60ee3630/attachment.bin>
More information about the llvm-commits
mailing list