[llvm] r256302 - Disable use list order on the gold plugin.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 15:45:49 PST 2015


Author: rafael
Date: Tue Dec 22 17:45:49 2015
New Revision: 256302

URL: http://llvm.org/viewvc/llvm-project?rev=256302&view=rev
Log:
Disable use list order on the gold plugin.

It turns out that his is *really* slow. With this change the link of
clang with plugin-opt=emit-llvm goes from 41 to 26 seconds.

We can add an option to enable it again if needed.

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

Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=256302&r1=256301&r2=256302&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Tue Dec 22 17:45:49 2015
@@ -756,7 +756,7 @@ static void saveBCFile(StringRef Path, M
   raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
   if (EC)
     message(LDPL_FATAL, "Failed to write the output file.");
-  WriteBitcodeToFile(&M, OS, /* ShouldPreserveUseListOrder */ true);
+  WriteBitcodeToFile(&M, OS, /* ShouldPreserveUseListOrder */ false);
 }
 
 static void codegen(std::unique_ptr<Module> M) {




More information about the llvm-commits mailing list