paulkirth added a comment.

In D135488#3928975 <https://reviews.llvm.org/D135488#3928975>, @dblaikie wrote:
> 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)

I guess it could be moved, but I'm not sure it makes the most sense. 
`PrologEpilogueInserter` is also already emitting the optimization remarks for 
stack size, so IMO it makes sense to keep them together, since that's the place 
where that information is determined. But there is no technical reason why we 
couldn't move it later, since all the information to do the check is readily 
available.

Another point to consider is that we already have several ways to expose stack 
sizes to users. `-Wframe-larger-than` gives warnings when a threshold is 
exceeded, but we also provide `-fstack-size-section`, and `-fstack-usage` which 
output information about every function in the module.  And, as mentioned 
earlier, there is an optimization remark for stack sizes too.

Regardless, I'll take a look and see how easy it will be to expose this through 
the remarks infrastructure, since that seems to be a generally good idea here.


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