[PATCH] D39885: Don't enable ICF by default
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 18:23:55 PST 2017
rnk created this revision.
ICF is somewhat expensive, hurts debuggability, and is technically
non-conforming. We shouldn't enable it by default.
I considered disabling /OPT:REF by default, but it turns out that linker
GC actually speeds up debug build links by shrinking the final output.
https://reviews.llvm.org/D39885
Files:
lld/COFF/Config.h
lld/test/COFF/icf-associative.test
lld/test/COFF/icf-circular.test
lld/test/COFF/icf-circular2.test
lld/test/COFF/icf-simple.test
Index: lld/test/COFF/icf-simple.test
===================================================================
--- lld/test/COFF/icf-simple.test
+++ lld/test/COFF/icf-simple.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
+# RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \
# RUN: /verbose %t.obj > %t.log 2>&1
# RUN: FileCheck -check-prefix=ICF %s < %t.log
Index: lld/test/COFF/icf-circular2.test
===================================================================
--- lld/test/COFF/icf-circular2.test
+++ lld/test/COFF/icf-circular2.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
+# RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \
# RUN: /verbose %t.obj > %t.log 2>&1
# RUN: FileCheck %s < %t.log
Index: lld/test/COFF/icf-circular.test
===================================================================
--- lld/test/COFF/icf-circular.test
+++ lld/test/COFF/icf-circular.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
+# RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \
# RUN: /verbose %t.obj > %t.log 2>&1
# RUN: FileCheck %s < %t.log
Index: lld/test/COFF/icf-associative.test
===================================================================
--- lld/test/COFF/icf-associative.test
+++ lld/test/COFF/icf-associative.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
+# RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \
# RUN: /debug /verbose %t.obj > %t.log 2>&1
# RUN: FileCheck %s < %t.log
Index: lld/COFF/Config.h
===================================================================
--- lld/COFF/Config.h
+++ lld/COFF/Config.h
@@ -84,7 +84,7 @@
std::string OutputFile;
std::string ImportName;
bool DoGC = true;
- bool DoICF = true;
+ bool DoICF = false;
bool Relocatable = true;
bool Force = false;
bool Debug = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39885.122387.patch
Type: text/x-patch
Size: 2200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171110/0b0aac68/attachment.bin>
More information about the llvm-commits
mailing list