[PATCH] D93959: [ThinLTO] Default -enable-import-metadata to false

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 31 09:40:57 PST 2020


MaskRay created this revision.
MaskRay added reviewers: Prazek, eraman, mehdi_amini, tejohnson.
Herald added subscribers: hiraditya, inglorion.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The default value is dependent on `-DLLVM_ENABLE_ASSERTIONS={off,on}` (D22167 <https://reviews.llvm.org/D22167>), which is
error-prone. The few tests checking `!thinlto_src_module` can specify -enable-import-metadata explicitly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93959

Files:
  llvm/lib/Transforms/IPO/FunctionImport.cpp


Index: llvm/lib/Transforms/IPO/FunctionImport.cpp
===================================================================
--- llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -124,14 +124,8 @@
                                  cl::desc("Compute dead symbols"));
 
 static cl::opt<bool> EnableImportMetadata(
-    "enable-import-metadata", cl::init(
-#if !defined(NDEBUG)
-                                  true /*Enabled with asserts.*/
-#else
-                                  false
-#endif
-                                  ),
-    cl::Hidden, cl::desc("Enable import metadata like 'thinlto_src_module'"));
+    "enable-import-metadata", cl::init(false), cl::Hidden,
+    cl::desc("Enable import metadata like 'thinlto_src_module'"));
 
 /// Summary file to use for function importing when using -function-import from
 /// the command line.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93959.314190.patch
Type: text/x-patch
Size: 885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201231/e612480a/attachment.bin>


More information about the llvm-commits mailing list