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

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 14:15:07 PST 2016


> On Dec 22, 2015, at 3:45 PM, Rafael Espindola via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> 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.

plugin-opt=emit-llvm is a debug option, I’m not sure it is a good idea to “optimize” for this case and losing some reproducibility?

— 
Mehdi



> 
> 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) {
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list