xbolva00 added a comment. >> That's not stopped us from exposing attributes like minsize (and you >> proposed optsize as well) which get described in the same terms as -Os/-Oz >> in our documentation, so this ship has somewhat sailed.
Well, there is no promise that attribute matches -O flag in the documentation, indeed. But I understand your point and not a issue in practise. >> Look here: >> https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp >> and see lines (conditions) with SizeLevel and OptLevel. Second look, I think it is possible to rework those lines to respect attributes more; like for example MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1, PrepareForLTO)); in such way, that in the pass itself, we would do something like OptionXYZ = F.isMinSize() ? 0 : -1; Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126984/new/ https://reviews.llvm.org/D126984 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits