[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-11 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D81223#2087660 , @rcorcs wrote: > The way I see it, with size level for LTO, we could have a different LTO > optimization pipeline for size or runtime performance. So this is the important point to settle before going on

[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-11 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin added inline comments. Comment at: llvm/include/llvm/IR/PassManager.h:413 +/// LLVM-provided high-level optimization levels. +/// I think this change - moving OptimizationLevel out - should be in its own patch, to avoid noise. Commen

[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-11 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Sorry I haven't had a chance to review this yet. Added @mtrofin who recently added the OptimizationLevel class that this is leveraging, and @yamauchi who has also been looking at size optimizations in llvm. At a first glance it isn't clear to me how much of this is NF

[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-11 Thread Rodrigo Caetano Rocha via Phabricator via cfe-commits
rcorcs added a comment. The way I see it, with size level for LTO, we could have a different LTO optimization pipeline for size or runtime performance. For example, we could have a different tuning for inlining, vectorization, etc. We could also use the size level to automatically enable optim

[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-05 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D81223#2076420 , @rcorcs wrote: > This patch standardizes the use of OptimizationLevel across PassBuilder, > PassManagerBuilder, LTO configuration, and LTO code generators. Even with > this patch, further work is still nee

[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-05 Thread Rodrigo Caetano Rocha via Phabricator via cfe-commits
rcorcs added a comment. If reviewers think that this patch is touching in too many files, I could try to focus it only on the LTO related files, converting OptimizationLevel back to two separate values when necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-05 Thread Rodrigo Caetano Rocha via Phabricator via cfe-commits
rcorcs added a comment. LLVM already has the class PassBuilder::OptimizationLevel that encapsulates the logic of both speed and size optimization levels. This class already checks which values for SpeedLevel and SizeLevel are valid. However, other parts of the code define two separate variables

[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-04 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. > This patch is the first in the sequence of three patches for supporting size > optimization with LTO. Can you start by describing the problem you're trying to solve and the overall approach, including the end-to-end user-interface? Repository: rG LLVM Github M

[PATCH] D81223: Size LTO (1/3): Standardizing the use of OptimizationLevel

2020-06-04 Thread Rodrigo Caetano Rocha via Phabricator via cfe-commits
rcorcs created this revision. rcorcs added a reviewer: hiraditya. rcorcs added projects: LLVM, lld. Herald added subscribers: cfe-commits, msifontes, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauh