[llvm] [CodeGen][Remarks] Add the function name to the stack size remark (PR #69346)

Jon Roelofs via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 10:00:07 PDT 2023


jroelofs wrote:

> Isn't the diagnostic shown at the beginning of the function?

If the function has debuginfo, it points at the `{` which might not be on the same line as the function name. So you get diagnostics like:

```
test.c:10:1: remark: 8 stack bytes in function [-Rpass-analysis=prologepilog]
{
^
```

Compiler-generated functions without debug info explaining where they came from are even worse:
```
note: could not determine the original source location for test.c:0:0
remark: 16 stack bytes in function [-Rpass-analysis=prologepilog]
note: could not determine the original source location for test.c:0:0
```

https://github.com/llvm/llvm-project/pull/69346


More information about the llvm-commits mailing list