Commit 06f13f8
authored
[BOLT] Fix references in ignored functions in CFG state (llvm#140678)
When we call setIgnored() on functions that already have CFG built,
these functions are not going to get emitted and we risk missing
external function references being updated.
To mitigate the potential issues, run scanExternalRefs() on such
functions to create patches/relocations.
Since scanExternalRefs() relies on function relocations, we have to
preserve relocations until the function is emitted. As a result, the
memory overhead without debug info update could reach up to 2%.1 parent eb9ed93 commit 06f13f8
File tree
6 files changed
+102
-14
lines changed- bolt
- include/bolt/Core
- lib
- Core
- Rewrite
- test
- AArch64
- X86
6 files changed
+102
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2348 | 2348 | | |
2349 | 2349 | | |
2350 | 2350 | | |
| 2351 | + | |
2351 | 2352 | | |
2352 | 2353 | | |
2353 | 2354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
| 1035 | + | |
| 1036 | + | |
1039 | 1037 | | |
1040 | 1038 | | |
1041 | 1039 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | | - | |
1530 | | - | |
1531 | 1529 | | |
1532 | 1530 | | |
1533 | 1531 | | |
| |||
3244 | 3242 | | |
3245 | 3243 | | |
3246 | 3244 | | |
| 3245 | + | |
| 3246 | + | |
3247 | 3247 | | |
3248 | 3248 | | |
3249 | | - | |
| 3249 | + | |
3250 | 3250 | | |
3251 | | - | |
3252 | | - | |
3253 | | - | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
3254 | 3256 | | |
3255 | 3257 | | |
3256 | 3258 | | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
3257 | 3265 | | |
3258 | 3266 | | |
3259 | 3267 | | |
| |||
3273 | 3281 | | |
3274 | 3282 | | |
3275 | 3283 | | |
3276 | | - | |
3277 | | - | |
3278 | | - | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
3279 | 3289 | | |
3280 | 3290 | | |
3281 | 3291 | | |
| |||
3764 | 3774 | | |
3765 | 3775 | | |
3766 | 3776 | | |
3767 | | - | |
3768 | 3777 | | |
3769 | 3778 | | |
3770 | 3779 | | |
| |||
3773 | 3782 | | |
3774 | 3783 | | |
3775 | 3784 | | |
| 3785 | + | |
| 3786 | + | |
3776 | 3787 | | |
3777 | 3788 | | |
3778 | 3789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3446 | 3446 | | |
3447 | 3447 | | |
3448 | 3448 | | |
| 3449 | + | |
3449 | 3450 | | |
3450 | 3451 | | |
3451 | 3452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
0 commit comments