Commit e33db24
authored
Reland "[ThinLTO] Populate declaration import status except for distributed ThinLTO under a default-off new option" (#92718)
The original PR is reviewed in
#88024, and this PR adds one
line (b9f04d1)
to fix test
Limit to one thread for in-process ThinLTO to test `LLVM_DEBUG` log.
- This should fix build bot failure like
https://lab.llvm.org/buildbot/#/builders/259/builds/4727 and
https://lab.llvm.org/buildbot/#/builders/9/builds/43876
- I could repro the failure and see interleaved log messages by using
`-thinlto-threads=all`
**Original Commit Message:**
The goal is to populate `declaration` import status if a new flag
`-import-declaration` is on.
* For in-process ThinLTO, the `declaration` status is visible to backend
`function-import` pass, so `FunctionImporter::importFunctions` should
read the import status and be no-op for declaration summaries.
Basically, the postlink pipeline is updated to keep its current behavior
(import definitions), but not updated to handle `declaration` summaries.
Two use cases ([better call-graph
sort](https://discourse.llvm.org/t/rfc-for-better-call-graph-sort-build-a-more-complete-call-graph-by-adding-more-indirect-call-edges/74029#support-cross-module-function-declaration-import-5)
or [cross-module
auto-init](#87597 (comment)))
would use this bit differently.
* For distributed ThinLTO, the `declaration` status is not serialized to
bitcode. As discussed, #87600
will do this.1 parent 8b22bb8 commit e33db24
File tree
9 files changed
+444
-85
lines changed- llvm
- include/llvm
- IR
- Transforms/IPO
- lib
- LTO
- Transforms/IPO
- test
- ThinLTO/X86
- Transforms/FunctionImport
- tools/llvm-link
9 files changed
+444
-85
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
590 | 594 | | |
591 | 595 | | |
592 | 596 | | |
| |||
1272 | 1276 | | |
1273 | 1277 | | |
1274 | 1278 | | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1275 | 1282 | | |
1276 | 1283 | | |
1277 | 1284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
159 | | - | |
| 162 | + | |
160 | 163 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
168 | | - | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
199 | 202 | | |
200 | 203 | | |
201 | 204 | | |
202 | | - | |
| 205 | + | |
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
210 | | - | |
211 | | - | |
| 213 | + | |
| 214 | + | |
212 | 215 | | |
213 | | - | |
| 216 | + | |
214 | 217 | | |
| 218 | + | |
| 219 | + | |
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
| |||
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
284 | | - | |
| 289 | + | |
285 | 290 | | |
286 | | - | |
| 291 | + | |
287 | 292 | | |
288 | 293 | | |
289 | 294 | | |
| |||
1395 | 1400 | | |
1396 | 1401 | | |
1397 | 1402 | | |
| 1403 | + | |
1398 | 1404 | | |
1399 | 1405 | | |
1400 | 1406 | | |
| |||
1403 | 1409 | | |
1404 | 1410 | | |
1405 | 1411 | | |
| 1412 | + | |
| 1413 | + | |
1406 | 1414 | | |
1407 | 1415 | | |
1408 | 1416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
720 | 720 | | |
721 | 721 | | |
722 | 722 | | |
723 | | - | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
724 | 731 | | |
725 | 732 | | |
726 | 733 | | |
| |||
0 commit comments