https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339
--- Comment #8 from Jakub Jelinek ---
The stdarg pass already performs similar analysis, see e.g.
reachable_at_most_once function, because if those aren't used in loops and
escape, it computes not just whether the function uses some fp or gpr arg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339
Richard Biener changed:
What|Removed |Added
CC||jamborm at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339
--- Comment #6 from Mathias Stearn ---
> The question is how common in the wild it is and if it is worth the work.
I'm not sure how common it is, but this is my use case. The code in the bug
report is a slightly simplified example from some Real
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339
--- Comment #5 from Mathias Stearn ---
I filed a related bug with clang right after this one if anyone want to follow
along https://bugs.llvm.org/show_bug.cgi?id=49395.
Just because clang does worse doesn't mean gcc shouldn't do better ;)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339
--- Comment #3 from Richard Biener ---
So we could try to lower even va_start/end to expose the va_list meta fully
to the middle-end early which should eventually allow eliding it. That
would require introducing other builtins/internal fns to al
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339
--- Comment #2 from Richard Biener ---
Btw, clang manages to produce the following, which shows the situation could be
worse ;)
test_va:# @test_va
.cfi_startproc
# %bb.0:
subq$88, %rsp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99339
Richard Biener changed:
What|Removed |Added
Ever confirmed|0 |1
Keywords|