The changes are to support Os and Oz inside the LTO.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Thanks for the patch.
I think this probably should be split up in 2 different changes:
- Changes to the pipeline (llvm/lib/Transforms/IPO/PassManagerBuilder.cpp). Ideally those come with some data motivating the change and why there won't be regressions.
- Changes to LTOCodeGenerator & co. They also need a test.
Comment Actions
I don' think mapping 's' to 4 and 'z' to 5 is suitable. It is quite different. If you just want clang -fuse-ld=lld -Oz -flto{,=thin} to work, it already does after D79919
Comment Actions
First of all, the changes in D719919 does not pass the SizeLevel information to any optimizations including inlining.
Secondly, the changes in D79919 is not general. It does not work in MacOS.
clang-format: please reformat the code