[PATCH] D132623: [CodeGen] Disable tail calls at -O0/-O1
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 23:54:33 PDT 2022
dblaikie added a comment.
In D132623#3747780 <https://reviews.llvm.org/D132623#3747780>, @rnk wrote:
> The goal clearly makes sense to me, and I think this is a reasonable way to do it. Another option is to implement this in the frontend the way that we implement `optnone` at -O0.
>
> + at probinson @dblaikie, this is kind of -Og / -O1 related if you have thoughts on how that should be handled.
I think it'd be good to have some more words about how exactly this improves debuggability - because at least at a cursory reading I was/am confused - DWARFv5 has debug info to more accurately model tail calls so back traces can be provided. Does that not work in some cases? If this is about debuggability in the absence of debug info - I'm not sure I'm in support of this direction. Tail calls lose stack trace info in a similar way to inlining, and we don't disable inlining at -O1 - so is there some reasoning that differentiates the impact of these cases & justifies treating one differently than the other?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132623/new/
https://reviews.llvm.org/D132623
More information about the llvm-commits
mailing list