[PATCH] D127488: [GlobalISel][DebugInfo] Remove debug info with zero line from constants inserted at entry block

Vladislav Dzhidzhoev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 14:58:48 PDT 2022


dzhidzhoev added a comment.

In D127488#3639858 <https://reviews.llvm.org/D127488#3639858>, @dblaikie wrote:

> Does seem like a relatively small win - is there a particular situation where you came across this/where it was important for your usage? (it'd be interesting to know of novel use cases that might motivate changes like this)

It was noticed that almost each instruction accessing global value is marked with zero line in debug_line (even in simple case like that https://godbolt.org/z/W6shEoh95 at lines 23, 27).

Then it was discovered that for some source files we had significant increase of debug_* section size compared to SelectionDAG because of that, even considering difference of output code size of different backends. For these files we can reduce debug_* sections size by reducing debug_line size - like for files listed in review message:

| Source path                                                    | SDag debug_* sz | GISel debug_* sz | GISel+patch debug_* sz |
| -------------------------------------------------------------- | --------------- | ---------------- | ---------------------- |
| `SingleSource/Regression/C/gcc-c-torture/execute/strlen-2.c`   | 3116            | 8796             | 3926                   |
| `SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c` | 16273           | 20154            | 17248                  |
| `SingleSource/Benchmarks/Misc/flops-4.c`                       | 4574            | 4989             | 4595                   |
| `MultiSource/Benchmarks/MiBench/consumer-typeset/z31.c`        | 3198            | 5161             | 4647                   |
| `MultiSource/Benchmarks/Prolangs-C/gnugo/showinst.c`           | 1472            | 1856             | 1478                   |
|




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127488/new/

https://reviews.llvm.org/D127488



More information about the llvm-commits mailing list