[lld] [llvm] [ICF] Add a NOP after branch in ICF thunk to improve debugability (PR #154986)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 13:06:26 PDT 2025
dwblaikie wrote:
(if the functions have padding to force 0x10 alignment, then their ranges can be [0, 1) or [0, 2) up to [0, 10) - any of those values would be OK, doesn't matter if the padding is included in the function or not)
In reality, if you build this example and actually link it (not sure how to then dwarfdump that on godbolt, so you'll have to do this locally):
```
void f1() { }
void f2() { }
int main() { }
```
```
clang++-tot test.cpp -g -O3 -ffunction-sections && llvm-dwarfdump-tot -debug-line a.out
```
```
Address Line Column File ISA Discriminator OpIndex Flags
------------------ ------ ------ ------ --- ------------- ------- -------------
0x0000000000001130 1 12 0 0 0 0 is_stmt prologue_end
0x0000000000001131 1 12 0 0 0 0 is_stmt end_sequence
0x0000000000001140 2 12 0 0 0 0 is_stmt prologue_end
0x0000000000001141 2 12 0 0 0 0 is_stmt end_sequence
0x0000000000001150 3 13 0 0 0 0 is_stmt prologue_end
0x0000000000001153 3 13 0 0 0 0 is_stmt end_sequence
```
https://github.com/llvm/llvm-project/pull/154986
More information about the llvm-commits
mailing list