[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz
Ayke via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 8 04:28:45 PST 2022
aykevl added a comment.
Herald added a reviewer: MaskRay.
I would be very interested in this patch, because for me to use ThinLTO without size regressions I need to set the optimization size level in the linker (`PassManagerBuilder.SizeLevel` etc).
This patch seems mostly correct to me, except for the function attributes. These function attributes (`optsize`, `minsize`) should IMHO be set in the frontend, not in the linker.
Apart from that, would it be reasonable to implement this in the form of `-plugin-opt=Os` and `-plugin-opt=Oz`? That is perhaps a cleaner UI (doesn't need a new flag!) and more cleanly maps to `PassBuilder::Oz` and the like.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72404/new/
https://reviews.llvm.org/D72404
More information about the cfe-commits
mailing list