[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

[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

[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

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

2020-06-05 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,