[lld] r241320 - COFF: Call exit(0) on success to not call destructors.

Rui Ueyama ruiu at google.com
Thu Jul 2 22:31:35 PDT 2015


Author: ruiu
Date: Fri Jul  3 00:31:35 2015
New Revision: 241320

URL: http://llvm.org/viewvc/llvm-project?rev=241320&view=rev
Log:
COFF: Call exit(0) on success to not call destructors.

This change cut the link time of chrome.dll from 24 seconds
to 22 seconds (5% gain). When the control reaches end of link(),
all output files have already been written. All in-memory
objects can just vanish. There is no use to call their dtors.

Modified:
    lld/trunk/COFF/Driver.cpp

Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=241320&r1=241319&r2=241320&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Fri Jul  3 00:31:35 2015
@@ -652,7 +652,8 @@ bool LinkerDriver::link(llvm::ArrayRef<c
     }
     Symtab.printMap(Out);
   }
-  return true;
+  // Call exit to avoid calling destructors.
+  exit(0);
 }
 
 } // namespace coff





More information about the llvm-commits mailing list