tejohnson added inline comments.

================
Comment at: llvm-9.0.0-20190629/clang/lib/Driver/ToolChains/CommonArgs.cpp:395
+      if(OOpt == "s" || OOpt == "z")
+        OOpt = "3";
+    }
----------------
Os/Oz are closer to O2 than O3 (which allows much more aggressive code size 
increasing optimizations).

Better though to add a size level to the LTO::Config, teach lld to pass it 
through properly, then using the LTO Config to set the SizeLevel in the old PM 
and the PassBuilder::OptimizationLevel in the new PM when setting up the LTO 
backend pipelines, similar to how CodeGenLevel.OptimizeSize is handled in clang 
(BackendUtil.cpp).

My concern is that silently mapping Os/Oz to do something different than in the 
non-LTO pipeline is going to end up more confusing than the current error 
(which isn't good either, but at least makes it clear that it isn't supported).


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63976/new/

https://reviews.llvm.org/D63976



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to