[PATCH] D135488: [codegen] Display stack layouts in console

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 15 13:02:01 PST 2022


nickdesaulniers added a comment.

In D135488#3928567 <https://reviews.llvm.org/D135488#3928567>, @nickdesaulniers wrote:

> In D135488#3928559 <https://reviews.llvm.org/D135488#3928559>, @arsenm wrote:
>
>> In D135488#3928557 <https://reviews.llvm.org/D135488#3928557>, @nickdesaulniers wrote:
>>
>>> Can we add a `Note` diagnostic when we emit a `-Wframe-larger-than=` that alludes to re-running with `-mllvm -print-stack-frame` to get additional info?
>>>
>>> We should update the release notes of clang to mention this feature, too.
>>
>> I don't think we should be pointing users to -mllvm flags. Plus, I don't really think random dbgs() printing is going to interact correctly with other diagnostics
>
> Then how will users know about super cool things? We could create a new front end flag for this `-mllvm` flag, a la https://reviews.llvm.org/D131986.

Sorry, bad example; that example is adding IR Function attributes, not setting `-mllvm` flags (which tend to get dropped during LTO unless re-passed to the linker), but there is a `-mllvm` flag for that. https://reviews.llvm.org/D127988

Regardless, we _could_ wire up a frontend flag for more info, I think. Not sure we have precedence for that, but it would be really really helpful to folks presented with `-Wframe-larger-than=` warnings.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135488



More information about the cfe-commits mailing list