Issue |
139970
|
Summary |
Long and memory-wasting debug symbols generation
|
Labels |
new issue
|
Assignees |
|
Reporter |
speshuric
|
### Steps to reproduce
1. Save attached [main.cpp.txt](https://github.com/user-attachments/files/20214729/main.cpp.txt) as cpp file
2. Compile it with debug information and O2/O3 optimizations. I use: `clang++ main.cpp -g -O2`
3. Uncomment lines one by one and compile again
### Expected
Compile time is almost instantly.
### Actually
Compile time grows twice with every uncommented line. Memory usage exceeds 20GB with uncommented line with `f24`
| Last uncommented line | Compile time on my PC, seconds |
|--------|--------|
| f16 | 0.945 |
| f17 | 1.627 |
| f18 | 3.170 |
| f19 | 6.121 |
| f20 | 12.355 |
| f21 | 25.471 |
| f22 | 51.952 |
| f23 | 1:46.11 |
### Environment
```text
$clang++ --version
clang version 19.1.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
```text
$uname -a
Linux 6.14.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 09 May 2025 17:36:18 +0000 x86_64 GNU/Linux
```
Despite I use clang installed as package from archlinux repos, the same issue observed on [godbolt](https://godbolt.org/) site with various clang versions and targets.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs