[PATCH] D43040: gold-plugin: Do not set codegen opt level based on LTO opt level.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 18:45:16 PST 2018


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL324557: gold-plugin: Do not set codegen opt level based on LTO opt level. (authored by pcc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D43040?vs=133286&id=133355#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D43040

Files:
  llvm/trunk/tools/gold/gold-plugin.cpp


Index: llvm/trunk/tools/gold/gold-plugin.cpp
===================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp
+++ llvm/trunk/tools/gold/gold-plugin.cpp
@@ -727,20 +727,6 @@
   return FD;
 }
 
-static CodeGenOpt::Level getCGOptLevel() {
-  switch (options::OptLevel) {
-  case 0:
-    return CodeGenOpt::None;
-  case 1:
-    return CodeGenOpt::Less;
-  case 2:
-    return CodeGenOpt::Default;
-  case 3:
-    return CodeGenOpt::Aggressive;
-  }
-  llvm_unreachable("Invalid optimization level");
-}
-
 /// Parse the thinlto_prefix_replace option into the \p OldPrefix and
 /// \p NewPrefix strings, if it was specified.
 static void getThinLTOOldAndNewPrefix(std::string &OldPrefix,
@@ -767,7 +753,6 @@
 
   Conf.MAttrs = MAttrs;
   Conf.RelocModel = RelocationModel;
-  Conf.CGOptLevel = getCGOptLevel();
   Conf.DisableVerify = options::DisableVerify;
   Conf.OptLevel = options::OptLevel;
   if (options::Parallelism)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43040.133355.patch
Type: text/x-patch
Size: 967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180208/c6cabe03/attachment.bin>


More information about the llvm-commits mailing list