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
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
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
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