dblaikie added a comment.

In D135488#3928963 <https://reviews.llvm.org/D135488#3928963>, @paulkirth wrote:

> In D135488#3928831 <https://reviews.llvm.org/D135488#3928831>, @dblaikie 
> wrote:
>
>> Any chance we could squirrel the info away (I assume there's a reason we 
>> can't compute the info where the warn-stack-size LLVM feature is implemented 
>> in PrologEpilogInserter.cpp) somewhere, and emit it as part of the 
>> frame-larger-than/warn-stack-size diagnostic?
>>
>> (also, we do already have an opt remark for stack frame size in general (in 
>> PrologEpilogInserter, very close to where warn-stack-size is implemented), 
>> so it seems OK to use the remark infrastructure for a more detailed stack 
>> report - but ideally if the point is to make frame-larger-than better, it'd 
>> be good to include the info in that diagnostic)
>
> Originally, I had prototyped this to run when emitting `-Wframe-larger-than` 
> diagnostics, however being able to dump the stack layout easily seems 
> valuable on its own. The biggest advantage to delaying the pass is that we 
> can print better diagnostics after the `LiveDebugValues` pass has a chance to 
> run. The layout isn't affected, but we can print out more variable mappings 
> by delaying the printing pass.

Fair enough - could the warn-stack-size warning be moved to there, then, and 
then the information included in the warning? It could have both a warning and 
remark form, so folks could use the remark form when they just want all the 
reports or don't want the reports phrased as a problem, but as an informational 
message? (though this may or may not be worth it - I guess people can turn on 
the warning, lower the threshold, and specifically make this warning a 
non-error, which amounts to roughly the same thing as a remark)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135488

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to