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

Rodrigo Caetano Rocha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 23:06:28 PDT 2020


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, shauheen, jpienaar, rriddle, mehdi_amini, dexonsmith, steven_wu, MaskRay, aheejin, arichardson, inglorion, sbc100, mgorny, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: MaskRay.
Herald added projects: clang, MLIR.

This patch is the first in the sequence of three patches for supporting size optimization with LTO. The planned patches are:
1: Standardizing the use of OptimizationLevel across pass builders, which includes both SpeedupLevel and SizeLevel.
2: Enable the support for -Os and -Oz for LTO in lld.
3: Tune the LTO pipeline for size optimization.

Since we already have a class that describes both speed and size levels of optimization, I believe it is a good idea to use across the code base when defining optimization levels.
In the next patch, instead of adding a SizeLevel variable for the LTO configuration, I'll be able to simply use this OptimizationLevel variable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81223

Files:
  clang/lib/CodeGen/BackendUtil.cpp
  lld/COFF/LTO.cpp
  lld/ELF/LTO.cpp
  lld/wasm/LTO.cpp
  llvm/examples/Bye/Bye.cpp
  llvm/include/llvm/IR/PassManager.h
  llvm/include/llvm/LTO/Config.h
  llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
  llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h
  llvm/include/llvm/Passes/PassBuilder.h
  llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h
  llvm/lib/IR/PassManager.cpp
  llvm/lib/LTO/LTO.cpp
  llvm/lib/LTO/LTOBackend.cpp
  llvm/lib/LTO/LTOCodeGenerator.cpp
  llvm/lib/LTO/ThinLTOCodeGenerator.cpp
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/tools/bugpoint/bugpoint.cpp
  llvm/tools/llvm-lto/llvm-lto.cpp
  llvm/tools/llvm-lto2/llvm-lto2.cpp
  llvm/tools/lto/lto.cpp
  llvm/tools/opt/CMakeLists.txt
  llvm/tools/opt/NewPMDriver.cpp
  llvm/tools/opt/opt.cpp
  mlir/lib/ExecutionEngine/OptUtils.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81223.268668.patch
Type: text/x-patch
Size: 53410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200605/1549e1ad/attachment-0001.bin>


More information about the cfe-commits mailing list