[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D72404#3310704 , @aykevl wrote: > @mehdi_amini thanks for explaining! D119342 > moves slightly closer to removing > SizeLevel from the pass pipeline setup. I left a comment on D119342

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-10 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. @mehdi_amini thanks for explaining! D119342 moves slightly closer to removing SizeLevel from the pass pipeline setup. --- In other news, I found a workaround that can be used to avoid the size increase due to LoopRotate (until D119342

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-09 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D72404#3307623 , @aykevl wrote: > So, should all passes just look at the `optsize` and `minsize` attributes > instead of the `SizeLevel`? In other words, should > `PassManagerBuilder.SizeLevel` be removed and should passes

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-09 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. After some more testing on a larger amount of code (many small programs, together over 1MB of code), LoopRotate indeed seems to be the culprit. I'm now looking into a patch to LoopRotate to respect the `optsize` function attribute. Repository: rG LLVM Github Monorepo

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-09 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Apparently there is also another patch that tries to do something very similar: D81223 . In D72404#3305275 , @mehdi_amini wrote: > Why can't you build the object files with `-Os` in the first place

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-08 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D72404#3304205 , @aykevl wrote: > 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`

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-08 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. I just saw this. I know it is a good idea to have choice during link time for the pipeline configuration and from your benchmark it also has size impact on the output. I also feel like this is going in the wrong direction as if I have part of the object files built wi

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2022-02-08 Thread Ayke via Phabricator via cfe-commits
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 f

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2020-01-14 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61859 tests passed, 0 failed and 781 were skipped. {icon question-circle color=gray} clang-tidy: unknown. {icon times-circle color=red} clang-format: fail. Please format your changes with clang-format by runnin

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2020-01-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 238142. ychen edited the summary of this revision. ychen added a comment. - fix test when clang is the host compiler Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72404/new/ https://reviews.llvm.org/D72404 Files

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2020-01-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D72404#1820628 , @tycho wrote: > In D72404#1820461 , > @merge_guards_bot wrote: > > > {icon times-circle color=red} Unit tests: fail. 61858 tests passed, 1 > > failed and 781 were skipped

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2020-01-14 Thread Steven Noonan via Phabricator via cfe-commits
tycho added a subscriber: merge_guards_bot. tycho added a comment. In D72404#1820461 , @merge_guards_bot wrote: > {icon times-circle color=red} Unit tests: fail. 61858 tests passed, 1 failed > and 781 were skipped. > > failed: Clang.CodeGen/thinlto-deb

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2020-01-14 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 61858 tests passed, 1 failed and 781 were skipped. failed: Clang.CodeGen/thinlto-debug-pm.c {icon question-circle color=gray} clang-tidy: unknown. {icon times-circle color=red} clang-format: fail. Please format

[PATCH] D72404: [ThinLTO/FullLTO] Support Os and Oz

2020-01-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 238071. ychen added a comment. - rebase & clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72404/new/ https://reviews.llvm.org/D72404 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thi