tejohnson added a comment. In D72404#3310704 <https://reviews.llvm.org/D72404#3310704>, @aykevl wrote:
> @mehdi_amini thanks for explaining! D119342 > <https://reviews.llvm.org/D119342> moves slightly closer to removing > SizeLevel from the pass pipeline setup. I left a comment on D119342 <https://reviews.llvm.org/D119342> - I think that is the right way to go. As mentioned there, there is still some legacy handling of options passed down from the driver, but over time we've been trying to move things to use function attributes, for the reasons @mehdi_amini mentioned. To expand on one of the reasons Mehdi mentioned: using function attributes naturally handles LTO linking in the case where one file is compiled `-flto -Os` and another is compiled `-flto -O2` the same way as if you compiled the two files with those different flags all the way down to native code without LTO. Using the approach in this pass you would be forced to pick either `-Os` or `-O2` for both files at LTO link time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72404/new/ https://reviews.llvm.org/D72404 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits