Commit 9833a55
[OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode
The `OpenMPOpt` pass is pivotal to the performance of many OpenMP
offloading programs. When we perform non-LTO builds with OpenMP we used
to link the OpenMP deviceRTL individually for each TU. This lead to us
getting an additional attributor run on the combined runtime and user
code. When we used LTO we lost a run and suffered a large performance
degradation. This patch simply adds in the extra `OpenMPOpt` pass that
we miss into the LTO pipeline. This patch fixes the performance
regression shown in applications that used OpenMP offloading in LTO
mode.
Previously, this wasn't legal to do as we could emit new runtime calls
into the module. That was fixed by D142646.
Depends on D142646
Fixes #60300
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D142650
(cherry picked from commit 6185246)1 parent 84f3164 commit 9833a55
File tree
3 files changed
+4
-2
lines changed- clang/tools/clang-linker-wrapper
- llvm
- lib/Passes
- test/Other
3 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
517 | | - | |
518 | 516 | | |
519 | 517 | | |
520 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1712 | 1712 | | |
1713 | 1713 | | |
1714 | 1714 | | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
1715 | 1718 | | |
1716 | 1719 | | |
1717 | 1720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
0 commit comments