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.

llvm-svn: 256302
This commit is contained in:
Rafael Espindola 2015-12-22 23:45:49 +00:00
parent b04a60c3d7
commit 69b537cdd4

View File

@ -756,7 +756,7 @@ static void saveBCFile(StringRef Path, Module &M) {
raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None); raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
if (EC) if (EC)
message(LDPL_FATAL, "Failed to write the output file."); 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) { static void codegen(std::unique_ptr<Module> M) {