[PATCH] D19384: [gold] Gate value name discarding under save-temps

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 22:21:45 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL267279: [gold] Gate value name discarding under save-temps (authored by tejohnson).

Changed prior to commit:
  http://reviews.llvm.org/D19384?vs=54563&id=54766#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19384

Files:
  llvm/trunk/test/tools/gold/X86/comdat.ll
  llvm/trunk/test/tools/gold/X86/strip_names.ll
  llvm/trunk/test/tools/gold/X86/type-merge2.ll
  llvm/trunk/tools/gold/gold-plugin.cpp

Index: llvm/trunk/test/tools/gold/X86/comdat.ll
===================================================================
--- llvm/trunk/test/tools/gold/X86/comdat.ll
+++ llvm/trunk/test/tools/gold/X86/comdat.ll
@@ -1,9 +1,8 @@
 ; RUN: llvm-as %s -o %t.o
 ; RUN: llvm-as %p/Inputs/comdat.ll -o %t2.o
 ; RUN: %gold -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t.o %t2.o \
-; RUN:  -plugin-opt=no-discard-value-names \
-; RUN:  -plugin-opt=emit-llvm
-; RUN: llvm-dis %t3.o -o - | FileCheck %s
+; RUN:  -plugin-opt=save-temps
+; RUN: llvm-dis %t3.o.bc -o - | FileCheck %s
 
 $c1 = comdat any
 
Index: llvm/trunk/test/tools/gold/X86/type-merge2.ll
===================================================================
--- llvm/trunk/test/tools/gold/X86/type-merge2.ll
+++ llvm/trunk/test/tools/gold/X86/type-merge2.ll
@@ -1,10 +1,9 @@
 ; RUN: llvm-as %s -o %t.o
 ; RUN: llvm-as %p/Inputs/type-merge2.ll -o %t2.o
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
-; RUN:    --plugin-opt=emit-llvm \
-; RUN:    --plugin-opt=no-discard-value-names \
+; RUN:    --plugin-opt=save-temps \
 ; RUN:    -shared %t.o %t2.o -o %t3.o
-; RUN: llvm-dis %t3.o -o - | FileCheck %s
+; RUN: llvm-dis %t3.o.bc -o - | FileCheck %s
 
 %zed = type { i8 }
 define void @foo()  {
Index: llvm/trunk/test/tools/gold/X86/strip_names.ll
===================================================================
--- llvm/trunk/test/tools/gold/X86/strip_names.ll
+++ llvm/trunk/test/tools/gold/X86/strip_names.ll
@@ -1,14 +1,12 @@
 ; RUN: llvm-as %s -o %t.o
 
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
-; RUN:    --plugin-opt=emit-llvm \
-; RUN:    --plugin-opt=no-discard-value-names \
+; RUN:    --plugin-opt=save-temps \
 ; RUN:    -shared %t.o -o %t2.o
-; RUN: llvm-dis %t2.o -o - | FileCheck %s
+; RUN: llvm-dis %t2.o.bc -o - | FileCheck %s
 
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
 ; RUN:    --plugin-opt=emit-llvm \
-; RUN:    --plugin-opt=discard-value-names \
 ; RUN:    -shared %t.o -o %t2.o
 ; RUN: llvm-dis %t2.o -o - | FileCheck ---check-prefix=NONAME %s
 
Index: llvm/trunk/tools/gold/gold-plugin.cpp
===================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp
+++ llvm/trunk/tools/gold/gold-plugin.cpp
@@ -166,10 +166,8 @@
   static unsigned Parallelism = 0;
 #ifdef NDEBUG
   static bool DisableVerify = true;
-  static bool DiscardValueNames = true;
 #else
   static bool DisableVerify = false;
-  static bool DiscardValueNames = false;
 #endif
   static std::string obj_path;
   static std::string extra_library_path;
@@ -226,10 +224,6 @@
         message(LDPL_FATAL, "Invalid parallelism level: %s", opt_ + 5);
     } else if (opt == "disable-verify") {
       DisableVerify = true;
-    } else if (opt == "discard-value-names") {
-      DiscardValueNames = true;
-    } else if (opt == "no-discard-value-names") {
-      DiscardValueNames = false;
     } else {
       // Save this option to pass to the code generator.
       // ParseCommandLineOptions() expects argv[0] to be program name. Lazily
@@ -1119,7 +1113,8 @@
                                raw_fd_ostream *OS, unsigned TaskID) {
   // Need to use a separate context for each task
   LLVMContext Context;
-  Context.setDiscardValueNames(options::DiscardValueNames);
+  Context.setDiscardValueNames(options::TheOutputType !=
+                               options::OT_SAVE_TEMPS);
   Context.enableDebugTypeODRUniquing(); // Merge debug info types.
   Context.setDiagnosticHandler(diagnosticHandlerForContext, nullptr, true);
 
@@ -1242,7 +1237,8 @@
   }
 
   LLVMContext Context;
-  Context.setDiscardValueNames(options::DiscardValueNames);
+  Context.setDiscardValueNames(options::TheOutputType !=
+                               options::OT_SAVE_TEMPS);
   Context.enableDebugTypeODRUniquing(); // Merge debug info types.
   Context.setDiagnosticHandler(diagnosticHandlerForContext, nullptr, true);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19384.54766.patch
Type: text/x-patch
Size: 3915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160423/aba06d43/attachment.bin>


More information about the llvm-commits mailing list