[PATCH] D136283: [clang-tools-extra] [clangd] Split huge generated CompletionModel.cpp into smaller files

Sam James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 12:14:43 PDT 2022


thesamesam created this revision.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
thesamesam requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.

Previously build system generated single huge CompletionModel.cpp with size about 6.5 MiB.
Compilation + assembling on PPC32 with GCC + GNU assembler resulted in 22010 errors:

  {standard input}: Assembler messages:
  {standard input}:181155: Error: operand out of range (0x0000000000008164 is not between 0xffffffffffff8000 and 0x0000000000007fff)
  {standard input}:181192: Error: operand out of range (0x000000000000816c is not between 0xffffffffffff8000 and 0x0000000000007fff)
  {standard input}:181211: Error: operand out of range (0x0000000000008080 is not between 0xffffffffffff8000 and 0x0000000000007fff)
  {standard input}:181220: Error: operand out of range (0x00000000000081b8 is not between 0xffffffffffff8000 and 0x0000000000007fff)
  {standard input}:181225: Error: operand out of range (0x0000000000008168 is not between 0xffffffffffff8000 and 0x0000000000007fff)
  [...]

Separate compilation + assembling of given portion of code avoids exceeding
capabilities of compiler / assembler.

Bug: https://bugs.gentoo.org/829602
Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever at Apache.Org>
Tested-by: erhard_f at mailbox.org <erhard_f at mailbox.org>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136283

Files:
  clang-tools-extra/clangd/CMakeLists.txt
  clang-tools-extra/clangd/quality/CompletionModel.cmake
  clang-tools-extra/clangd/quality/CompletionModelCodegen.py
  clang-tools-extra/clangd/unittests/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136283.469005.patch
Type: text/x-patch
Size: 10445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221019/f739206c/attachment-0001.bin>


More information about the cfe-commits mailing list