[PATCH] D142650: [OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 26 11:24:09 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6185246f4f62: [OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode (authored by jhuber6).
Changed prior to commit:
https://reviews.llvm.org/D142650?vs=492498&id=492530#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142650/new/
https://reviews.llvm.org/D142650
Files:
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
llvm/lib/Passes/PassBuilderPipelines.cpp
llvm/test/Other/new-pm-lto-defaults.ll
Index: llvm/test/Other/new-pm-lto-defaults.ll
===================================================================
--- llvm/test/Other/new-pm-lto-defaults.ll
+++ llvm/test/Other/new-pm-lto-defaults.ll
@@ -78,6 +78,7 @@
; CHECK-O23SZ-NEXT: Running pass: InlinerPass
; CHECK-O23SZ-NEXT: Invalidating analysis: InlineAdvisorAnalysis
; CHECK-O23SZ-NEXT: Running pass: GlobalOptPass
+; CHECK-O23SZ-NEXT: Running pass: OpenMPOptPass
; CHECK-O23SZ-NEXT: Running pass: GlobalDCEPass
; CHECK-O23SZ-NEXT: Running pass: ArgumentPromotionPass
; CHECK-O23SZ-NEXT: Running pass: DeadArgumentEliminationPass
Index: llvm/lib/Passes/PassBuilderPipelines.cpp
===================================================================
--- llvm/lib/Passes/PassBuilderPipelines.cpp
+++ llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -1712,6 +1712,9 @@
// Optimize globals again after we ran the inliner.
MPM.addPass(GlobalOptPass());
+ // Run the OpenMPOpt pass again after global optimizations.
+ MPM.addPass(OpenMPOptPass(ThinOrFullLTOPhase::FullLTOPostLink));
+
// Garbage collect dead functions.
MPM.addPass(GlobalDCEPass());
Index: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
===================================================================
--- clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+++ clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
@@ -513,8 +513,6 @@
assert(CGOptLevelOrNone && "Invalid optimization level");
Conf.CGOptLevel = *CGOptLevelOrNone;
Conf.OptLevel = OptLevel[1] - '0';
- if (Conf.OptLevel > 0)
- Conf.UseDefaultPipeline = true;
Conf.DefaultTriple = Triple.getTriple();
LTOError = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142650.492530.patch
Type: text/x-patch
Size: 1662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230126/36e9a4e5/attachment.bin>
More information about the cfe-commits
mailing list