[PATCH] D48603: llvm-lto: Set OptLevel for ThinLTO codegen

Vlad Tsyrklevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 12:06:18 PDT 2018


vlad.tsyrklevich created this revision.
vlad.tsyrklevich added a reviewer: pcc.
Herald added subscribers: llvm-commits, steven_wu, inglorion, mehdi_amini.

Currently OptLevel is only set for regular LTO.


Repository:
  rL LLVM

https://reviews.llvm.org/D48603

Files:
  tools/llvm-lto/llvm-lto.cpp


Index: tools/llvm-lto/llvm-lto.cpp
===================================================================
--- tools/llvm-lto/llvm-lto.cpp
+++ tools/llvm-lto/llvm-lto.cpp
@@ -484,6 +484,7 @@
     ThinGenerator.setCacheMaxSizeFiles(ThinLTOCacheMaxSizeFiles);
     ThinGenerator.setCacheMaxSizeBytes(ThinLTOCacheMaxSizeBytes);
     ThinGenerator.setFreestanding(EnableFreestanding);
+    ThinGenerator.setOptLevel(OptLevel - '0');
 
     // Add all the exported symbols to the table of symbols to preserve.
     for (unsigned i = 0; i < ExportedSymbols.size(); ++i)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48603.152937.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180626/04296193/attachment.bin>


More information about the llvm-commits mailing list