[PATCH] D144844: [C++20] [Modules] Offer -fno-import-inter-module-function-defs to avoid duplicated compilation in modules

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 27 00:26:17 PST 2023


ChuanqiXu created this revision.
ChuanqiXu added reviewers: iains, Bigcheese, dblaikie.
ChuanqiXu added a project: clang-modules.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

Close https://github.com/llvm/llvm-project/issues/61015
Close https://github.com/llvm/llvm-project/issues/60996

Clang will import the function definitions from other module unit within
optimizations by default to get the best performance. But there are
cases users prefer faster compilation speed than the best performance.

Although we may not agree such ideas, we should offer an option for the
users to give them the right to choose.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144844

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/module-no-import-from-other-tu.cppm
  clang/test/Modules/inter-module-imports-function-defs.cppm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144844.500680.patch
Type: text/x-patch
Size: 5930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230227/ed650e77/attachment.bin>


More information about the cfe-commits mailing list