Skip to content

Use llvm-project release-23.x - #116787

Closed
thevar1able wants to merge 11 commits into
masterfrom
bump-llvm-project-release-23.x
Closed

thevar1able wants to merge 11 commits into
masterfrom
bump-llvm-project-release-23.x

Conversation

@thevar1able

@thevar1able thevar1able commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Use llvm-project release-23.x.


Workflow [PR]
Sync PR [sync-upstream/pr/116787]

Rebased ClickHouse patches from `ClickHouse/release-22.x` onto upstream
`release/23.x` (llvmorg-23.1.0+3). Dropped patches that were merged
upstream: the `ProgramStack.cpp` include fix and the `unordered_map`
copy-constructor node-leak fix with its follow-ups.

CMake adaptation:
- Synced LLVM per-component source lists with 23.x (renames like
  `X86VZeroUpper.cpp` -> `X86InsertVZeroUpper.cpp`, `ExpandMemCmp.cpp`
  moved from CodeGen to Scalar, new TableGen `MatchTable/` files, etc.)
- Added `tsan_adaptive_delay.cpp` and `sanitizer_unwind_aix.cpp` to
  compiler-rt source lists
- Added `text_encoding.cpp` to libcxx sources
- Bumped bundled LLVM version macros to 23.1.0
- Compile libcxx `text_encoding.cpp` with `-std=c++26` (`std::text_encoding`
  is a C++26 feature; upstream builds libcxx sources with a newer standard)
- Add new LLVM 23 tablegen outputs: `X86GenSDNodeInfo.inc`,
  `X86GenPostLegalizeGICombiner.inc`, `IntrinsicsAVR.h`, and the
  `-gisel-extended-llt` flag for `AArch64GenGlobalISel.inc`
- Generate `InstrumentorVariables.inc` needed by the new `Instrumentor`
  pass in `LLVMipo`
- Handle `[[nodiscard]]` on `try_lock_for` in `ProfiledLocks.h` (newly
  annotated in libc++ 23)
- Add missing includes no longer provided transitively by libc++ 23:
  `<atomic>` in Poco JSON `Array.h`, `<cstdlib>` in rocksdb (submodule
  bump), `<array>` in Jieba-CPP (submodule bump)
@clickhouse-gh

clickhouse-gh Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [77c09f0]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_llvm_coverage, 1/8) ERROR
Integration tests (amd_llvm_coverage, 2/8) ERROR
Integration tests (amd_llvm_coverage, 3/8) ERROR
Integration tests (amd_llvm_coverage, 4/8) ERROR
Integration tests (amd_llvm_coverage, 5/8) ERROR
Integration tests (amd_llvm_coverage, 6/8) ERROR
Integration tests (amd_llvm_coverage, 7/8) ERROR
Integration tests (amd_llvm_coverage, 8/8) ERROR
LLVM Coverage DROPPED

AI Review

Summary

This PR bumps the bundled llvm-project to release-23.x and carries the expected fallout fixes in the lean LLVM glue plus a few ClickHouse call sites. The remaining blockers are still in the LLVM CMake integration: native builds are missing the new ../libc include root required by LLVM 23, and several architecture-specific combined source lists still place new CodeGen / MCTargetDesc sources into the wrong component buckets, leaving clean static links brittle or broken.

Findings

❌ Blockers

  • [contrib/llvm-project-cmake/CMakeLists.txt:30, 426, 573] LLVM 23 lib/Support/APFloat.cpp now includes shared/math.h from ../libc, but the generic LLVM_INCLUDE_DIRS and the native-build llvm-min-tblgen / llvm-tblgen include dirs still do not add that root. The external cross-compiling helper was fixed, but a clean native LLVM-enabled build can still fail as soon as it compiles LLVMSupport or the in-tree tablegen tools.
    Suggested fix: append ${LLVM_SOURCE_DIR}/../libc to LLVM_INCLUDE_DIRS and to both in-tree tablegen target_include_directories blocks in contrib/llvm-project-cmake/CMakeLists.txt.
  • [contrib/llvm-project-cmake/sources/LLVMX86.cmake:5, contrib/llvm-project-cmake/sources/LLVMAArch64.cmake:5, contrib/llvm-project-cmake/sources/LLVMRISCV.cmake:5, contrib/llvm-project-cmake/sources/LLVMPowerPC.cmake:5, contrib/llvm-project-cmake/sources/LLVMLoongArch.cmake:5] The combined per-architecture source lists still classify several new LLVM 23 CodeGen / MCTargetDesc sources as *Info or *Utils (X86PostLegalizerCombiner.cpp, X86MCLFIRewriter.cpp, AArch64CodeLayoutOpt.cpp, AArch64PerfectShuffle.cpp, AArch64SRLTDefineSuperRegs.cpp, AArch64MCLFIRewriter.cpp, SVEShuffleOpts.cpp, RISCVInlineAsmLowering.cpp, RISCVQCRelaxMarking.cpp, PPCPrepareIFuncsOnAIX.cpp, LoongArchTargetObjectFile.cpp). That breaks the declared component split and makes clean static links depend on accidental library ordering on every affected architecture.
    Suggested fix: move each file into the matching *CODEGEN_SOURCES or *DESC_SOURCES bucket, mirroring the upstream LLVM 23 target CMake files and the already-split LLVMX86CodeGen.cmake / LLVMX86Desc.cmake lists.
Tests
  • ⚠️ The available PR report only contains Build profile diff; I did not have a clean native or non-x86 LLVM build log to prove the CMake integration end to end. The smallest evidence that closes this gap is one native LLVM-enabled clean build (covering LLVMSupport, llvm-min-tblgen, and llvm-tblgen) plus one non-x86 build or targeted link step that exercises the corrected per-architecture component buckets.
Final Verdict

❌ Changes required before merge.

@clickhouse-gh clickhouse-gh Bot added pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR. labels Aug 27, 2026
Comment thread contrib/Jieba-CPP Resolved
Comment thread contrib/rocksdb Resolved
@thevar1able
thevar1able marked this pull request as draft August 28, 2026 19:02
Comment thread contrib/Jieba-CPP

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, the comparison does not open on GitHub.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵 Fixed in da3ff93. Both contrib/Jieba-CPP (407ba0a…) and contrib/rocksdb (bbb9bc2…) were accidental gitlink moves unrelated to the LLVM bump, pointing at commits that do not exist in the repositories configured in .gitmodules — hence the comparison did not open on GitHub and Checkout Submodules failed, dropping every other job. Both are restored to the pointers on master; contrib/llvm-project is now the only submodule this branch bumps. Also merged master (which required taking its deletion of StorageWindowView.cpp).

@thevar1able thevar1able Aug 31, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, the comparison does not open on GitHub.

That is expected, because I didn't create forks and didn't push changes.

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything else LGTM.

@alexey-milovidov alexey-milovidov self-assigned this Aug 28, 2026

# X86 Info sources
set(LLVMX86INFO_SOURCES
${LLVM_SOURCE_DIR}/lib/Target/X86/GISel/X86PostLegalizerCombiner.cpp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X86PostLegalizerCombiner.cpp is an X86CodeGen source upstream, and X86MCLFIRewriter.cpp is an X86Desc source. In the active combined list they are both being archived into LLVMX86Info, while _llvm still exposes LLVMX86Info, LLVMX86Desc, and LLVMX86CodeGen as separate static libraries.

That makes the x86 target build rely on duplicate-library/link-order behavior instead of the declared component graph: new codegen/MC symbols now live in the earlier LLVMX86Info archive. Please move them to the same buckets as the split files and upstream layout: X86PostLegalizerCombiner.cpp under LLVMX86CODEGEN_SOURCES, and X86MCLFIRewriter.cpp under LLVMX86DESC_SOURCES.


# AArch64 Utils sources (needed by both Desc and CodeGen)
set(LLVMAARCH64UTILS_SOURCES
${LLVM_SOURCE_DIR}/lib/Target/AArch64/AArch64CodeLayoutOpt.cpp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These five files are not AArch64Utils upstream: AArch64CodeLayoutOpt.cpp, AArch64PerfectShuffle.cpp, AArch64SRLTDefineSuperRegs.cpp, and SVEShuffleOpts.cpp stay in AArch64CodeGen, while AArch64MCLFIRewriter.cpp belongs to AArch64Desc. Putting them into LLVMAARCH64UTILS_SOURCES means the active combined build archives codegen/desc objects into the lightweight helper bucket that ClickHouse later folds into LLVMAArch64Desc.

The current CI matrix can still pass if the final link line happens to repeat the dependent archives, but the component graph is now wrong and link-order-dependent. LLVMAARCH64UTILS_SOURCES should stay just AArch64BaseInfo.cpp; please move the new files into the matching LLVMAARCH64DESC_SOURCES / LLVMAARCH64CODEGEN_SOURCES sections.


# RISCV Info sources
set(LLVMRISCVINFO_SOURCES
${LLVM_SOURCE_DIR}/lib/Target/RISCV/GISel/RISCVInlineAsmLowering.cpp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RISCVInlineAsmLowering.cpp and RISCVQCRelaxMarking.cpp are both RISCVCodeGen sources upstream, but here they are being archived into LLVMRISCVInfo.

That strips the new LLVM 23 RISC-V codegen pieces out of the active LLVMRISCVCodeGen bucket and again makes link success depend on duplicate static-library ordering instead of the declared component split. Please move both files under LLVMRISCVCODEGEN_SOURCES.


# PowerPC Info sources
set(LLVMPOWERPCINFO_SOURCES
${LLVM_SOURCE_DIR}/lib/Target/PowerPC/PPCPrepareIFuncsOnAIX.cpp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PPCPrepareIFuncsOnAIX.cpp is a PowerPC codegen pass upstream, not target-info. Adding it to LLVMPOWERPCINFO_SOURCES means the new pass now lives in the earlier LLVMPowerPCInfo archive instead of LLVMPowerPCCodeGen.

That is the same link-order-dependent component drift as the other target lists in this patch. Please move it under LLVMPOWERPCCODEGEN_SOURCES.


# LoongArch Info sources
set(LLVMLOONGARCHINFO_SOURCES
${LLVM_SOURCE_DIR}/lib/Target/LoongArch/LoongArchTargetObjectFile.cpp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoongArchTargetObjectFile.cpp is part of upstream LoongArchCodeGen, and LoongArchTargetMachine.cpp constructs LoongArchELFTargetObjectFile from it. Putting that source into LLVMLOONGARCHINFO_SOURCES moves a codegen implementation into the earlier info archive instead of the active LLVMLoongArchCodeGen one.

CI can still stay green if the final link line repeats LLVMLoongArchInfo, but the component graph is wrong and brittle. Please move LoongArchTargetObjectFile.cpp under LLVMLOONGARCHCODEGEN_SOURCES.

thevar1able and others added 2 commits August 31, 2026 15:42
clang-tidy 23 flags `.get()->` on smart pointers (`readability-redundant-smartptr-get`)
in more contexts, and libc++ 23 makes `std::string` iterators raw pointers, so
`begin().base()` no longer compiles in `gtest_compressionCodec`.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=116787&sha=da3ff9339cf7c2a77486aca83edd682a26824bb2&name_0=PR&name_1=Build%20%28arm_tidy%29
PR: #116787

Co-Authored-By: Claude Fable 5 <[email protected]>
@thevar1able
thevar1able force-pushed the bump-llvm-project-release-23.x branch from da3ff93 to 53d5f99 Compare August 31, 2026 13:54
@thevar1able thevar1able added the hold Skip for auto-updating. label Aug 31, 2026
@thevar1able

thevar1able commented Aug 31, 2026 •

Copy link
Copy Markdown
Member Author

Needs amosbird/Jieba-CPP#1.
Will change submodule pointer back from thevar1able/Jieba-CPP once it is merged.

thevar1able and others added 3 commits August 31, 2026 16:20
…x commits

Same LLVM 23 include fixes (`<cstdlib>` in rocksdb `stderr_logger`,
`<array>` in `jieba_hmm_seg`), re-authored with the work email and pushed
to reachable branches: `ClickHouse/v10.10.1` in `ClickHouse/rocksdb` and
`clickhouse-submodule` in `thevar1able/Jieba-CPP`.

Co-Authored-By: Claude Fable 5 <[email protected]>
In `release/23.x`, `GlobalISelMatchTable.cpp` was split into
`Common/GlobalISel/MatchTable/{MatchTable,Matchers,Types}.cpp`, and
`lib/Support/APFloat.cpp` now includes `shared/math.h` from the `libc`
project, so `${LLVM_SOURCE_DIR}/../libc` must be on the include path
(matching upstream `LLVMSupport`).

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=116787&sha=45de7279e5046c978ae85a97330864dcef89b327&name_0=PR&name_1=Build%20%28amd_binary%29
#116787

Co-Authored-By: Claude Fable 5 <[email protected]>
`PACKAGE_VERSION` is embedded into DWARF producer strings via
`AsmPrinter`, so keep it in sync with the bundled LLVM version.

Co-Authored-By: Claude Fable 5 <[email protected]>
${CMAKE_CURRENT_BINARY_DIR}/include
${LLVM_SOURCE_DIR}/utils/TableGen
${LLVM_SOURCE_DIR}/../third-party/siphash/include
${LLVM_SOURCE_DIR}/../libc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only fixes the external native-tblgen project used when CMAKE_CROSSCOMPILING=ON. Native builds still go through the in-tree llvm-min-tblgen / llvm-tblgen definitions in contrib/llvm-project-cmake/CMakeLists.txt, and those targets still compile ${LLVMSUPPORT_SOURCES} without ${LLVM_SOURCE_DIR}/../libc in their include dirs (target_include_directories at lines 426-431 and 574-579).

LLVM 23 lib/Support/APFloat.cpp now unconditionally includes shared/math.h from libc, so a native LLVM-enabled build is still one clean build away from the same missing-header failure. Please add the same ${LLVM_SOURCE_DIR}/../libc include path to the in-tree tablegen targets too.

@clickhouse-gh

clickhouse-gh Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 77c09f06e with master 8627fa22f (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

⚠️ Significant changes: object file sizes, compile time of recompiled translation units.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes ⚠️

10372 object files changed (+32.30 MiB total), 46 added.

Object file Master PR Δ
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionsNumericIndexedVector.cpp.o 33.70 MiB 34.55 MiB +880.06 KiB (+2.55%)
contrib/llvm-project-cmake/CMakeFiles/LLVMVectorize.dir/__/llvm-project/llvm/lib/Transforms/Vectori… 2.62 MiB 3.23 MiB +620.66 KiB (+23.10%)
contrib/llvm-project-cmake/CMakeFiles/llvm-tblgen.dir/__/llvm-project/llvm/utils/TableGen/Common/Gl… new 528.88 KiB +528.88 KiB
contrib/llvm-project-cmake/CMakeFiles/LLVMipo.dir/__/llvm-project/llvm/lib/Transforms/IPO/Instrumen… new 483.29 KiB +483.29 KiB
src/CMakeFiles/dbms.dir/DataTypes/Serializations/SerializationMap.cpp.o 2.18 MiB 1.71 MiB -477.96 KiB (-21.44%)
contrib/llvm-project-cmake/CMakeFiles/LLVMVectorize.dir/__/llvm-project/llvm/lib/Transforms/Vectori… 1.14 MiB 1.59 MiB +463.10 KiB (+39.68%)
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/divide.cpp.o 14.39 MiB 14.71 MiB +324.66 KiB (+2.20%)
src/Dictionaries/CMakeFiles/clickhouse_dictionaries.dir/HashedDictionary.cpp.o 22.09 MiB 22.40 MiB +320.02 KiB (+1.41%)
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/modulo.cpp.o 25.38 MiB 25.68 MiB +312.79 KiB (+1.20%)
contrib/llvm-project-cmake/CMakeFiles/LLVMCodeGen.dir/__/llvm-project/llvm/lib/CodeGen/Rematerializ… new 260.60 KiB +260.60 KiB
contrib/llvm-project-cmake/CMakeFiles/LLVMAArch64CodeGen.dir/__/llvm-project/llvm/lib/Target/AArch6… 616.25 KiB 366.91 KiB -249.34 KiB (-40.46%)
src/Dictionaries/CMakeFiles/clickhouse_dictionaries.dir/HashedArrayDictionary.cpp.o 8.17 MiB 8.40 MiB +229.11 KiB (+2.74%)
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/midpoint.cpp.o 7.07 MiB 7.28 MiB +218.64 KiB (+3.02%)
src/CMakeFiles/dbms.dir/Core/Settings.cpp.o 3.40 MiB 3.61 MiB +212.91 KiB (+6.11%)
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/avg2.cpp.o 7.09 MiB 7.29 MiB +208.20 KiB (+2.87%)
contrib/llvm-project-cmake/CMakeFiles/LLVMAArch64CodeGen.dir/__/llvm-project/llvm/lib/Target/AArch6… 291.38 KiB 497.80 KiB +206.42 KiB (+70.84%)
contrib/llvm-project-cmake/CMakeFiles/LLVMTargetParser.dir/__/llvm-project/llvm/lib/TargetParser/AM… new 200.71 KiB +200.71 KiB
contrib/llvm-project-cmake/CMakeFiles/LLVMAArch64Desc.dir/__/llvm-project/llvm/lib/Target/AArch64/U… 342.50 KiB 146.61 KiB -195.89 KiB (-57.19%)
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/intDiv.cpp.o 15.45 MiB 15.64 MiB +194.68 KiB (+1.23%)
contrib/llvm-project-cmake/CMakeFiles/LLVMVectorize.dir/__/llvm-project/llvm/lib/Transforms/Vectori… 122.96 KiB 311.05 KiB +188.08 KiB (+152.96%)

727 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units ⚠️

12077 translation units recompiled, 30421 s compile time in total, 4336 of them have a recent master baseline.

Translation units without a recent master baseline:

  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/scalar_round.cc: 29.7 s
  • contrib/llvm-project-cmake/__/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp: 28.1 s
  • contrib/llvm-project-cmake/__/llvm-project/llvm/lib/Passes/PassBuilder.cpp: 24.2 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/scalar_temporal_binary.cc: 23.4 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/scalar_temporal_unary.cc: 21.4 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/scalar_arithmetic.cc: 18.9 s
  • contrib/aws-cmake/__/aws/generated/src/aws-cpp-sdk-s3/source/S3Client.cpp: 17.1 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/vector_swizzle.cc: 16.0 s
  • contrib/grpc-cmake/__/grpc/src/core/ext/transport/chttp2/transport/http2_server_transport.cc: 15.3 s
  • contrib/llvm-project-cmake/__/llvm-project/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp: 15.2 s
  • contrib/grpc-cmake/__/grpc/src/core/ext/transport/chttp2/transport/http2_client_transport.cc: 14.5 s
  • contrib/aws-cmake/__/aws/generated/src/aws-cpp-sdk-glue/source/GlueClient1.cpp: 14.4 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/aggregate_basic.cc: 14.2 s
  • contrib/hive-metastore-cmake/__/hive-metastore/ThriftHiveMetastore.cpp: 14.2 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/vector_sort.cc: 13.9 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/builder.cc: 13.7 s
  • contrib/aws-cmake/__/aws/generated/src/aws-cpp-sdk-glue/source/GlueClient.cpp: 13.7 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/vector_select_k.cc: 13.7 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/compute/kernels/hash_aggregate.cc: 13.7 s
  • contrib/arrow-cmake/__/arrow/cpp/src/arrow/scalar.cc: 13.6 s
  • ... and 218 more
Symbol sizes
Binary Symbol Master PR Δ
programs/clickhouse llvm::AArch64MCRegisterClassStorage new 203.23 KiB +203.23 KiB
programs/clickhouse-keeper llvm::AArch64MCRegisterClassStorage new 203.23 KiB +203.23 KiB
programs/clickhouse llvm::InlineFunctionImpl(llvm::CallBase&, llvm::InlineFunctionInfo&, bool, llvm::AAResults*, bool, … 82.31 KiB removed -82.31 KiB (-100.00%)
programs/clickhouse-keeper llvm::InlineFunctionImpl(llvm::CallBase&, llvm::InlineFunctionInfo&, bool, llvm::AAResults*, bool, … 82.25 KiB removed -82.25 KiB (-100.00%)
programs/clickhouse llvm::InlineFunctionImpl(llvm::CallBase&, llvm::InlineFunctionInfo&, bool, llvm::AAResults*, bool, … new 64.38 KiB +64.38 KiB
programs/clickhouse-keeper llvm::InlineFunctionImpl(llvm::CallBase&, llvm::InlineFunctionInfo&, bool, llvm::AAResults*, bool, … new 64.36 KiB +64.36 KiB
programs/clickhouse-keeper _ZNSt3__1L18__contention_tableE new 64.00 KiB +64.00 KiB
programs/clickhouse _ZNSt3__1L18__contention_tableE new 64.00 KiB +64.00 KiB

Job report

thevar1able added a commit that referenced this pull request Sep 1, 2026
\`llvm::ConstantInt::get(type, -1)\` implicitly truncates the sign-extended
value to the target width. LLVM 23 asserts that the value is representable
in the given bit width (\`APInt.h:127\`), so JIT compilation of \`groupBitAnd\`
aborted in debug builds for types narrower than 64 bits. Use
\`llvm::Constant::getAllOnesValue\` instead, which is exact for any width.

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=116787&sha=24ff9d93a336ff032a847bf46bb704bae2cea4a9&name_0=PR&name_1=Stateless%20tests%20(amd_debug,%20parallel)
PR: #116787

Co-Authored-By: Claude Fable 5 <[email protected]>
thevar1able and others added 2 commits September 1, 2026 05:06
`llvm::ConstantInt::get(type, -1)` implicitly truncates the sign-extended
value to the target width. LLVM 23 asserts that the value is representable
in the given bit width (`APInt.h:127`), so JIT compilation of `groupBitAnd`
aborted in debug builds for types narrower than 64 bits. Use
`llvm::Constant::getAllOnesValue` instead, which is exact for any width.

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=116787&sha=24ff9d93a336ff032a847bf46bb704bae2cea4a9&name_0=PR&name_1=Stateless%20tests%20(amd_debug,%20parallel)
PR: #116787

Co-Authored-By: Claude Fable 5 <[email protected]>
With libc++ 23 headers, clang started inlining `getDataArrayAt` — including
its exception-construction path — into every call site. Across ~3600
`BSINumericIndexedVector` template instantiations this bloated
`FunctionsNumericIndexedVector.cpp.o` by ~2 MiB and nearly doubled its
compile time (the build profile diff flagged +6% object size, and locally
the TU went from 74 s to 134 s). Moving the `throw` into a `[[noreturn]]
NO_INLINE` helper restores both: 76 s and most of the size (measured with
clang 22.1.8, identical flags, only the libc++ headers swapped).

Report: #116787 (comment)
PR: #116787

Co-Authored-By: Claude Fable 5 <[email protected]>
@thevar1able
thevar1able force-pushed the bump-llvm-project-release-23.x branch from c55004d to a15aff3 Compare September 1, 2026 03:07
endif()

set (LLVM_VERSION "22.1.1bundled")
set (LLVM_VERSION "23.1.0bundled")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLVM 23 lib/Support/APFloat.cpp now includes shared/math.h from ../libc, and the generic add_llvm_library helper below still gives every LLVM target only ${LLVM_INCLUDE_DIRS}. LLVMSupport itself is built through that helper and still compiles ${LLVMSUPPORT_SOURCES} (which includes APFloat.cpp), so fixing only the external native-tblgen project leaves a clean native LLVM-enabled build broken at the normal LLVMSupport target too.

Please add ${LLVM_SOURCE_DIR}/../libc to LLVM_INCLUDE_DIRS (or inject it from add_llvm_library) so every target that compiles LLVMSUPPORT_SOURCES gets the same include root, not just the external tablegen project.

thevar1able added a commit that referenced this pull request Sep 2, 2026
clang-tidy 23 flags `.get()->` on smart pointers (`readability-redundant-smartptr-get`)
in more contexts, and libc++ 23 makes `std::string` iterators raw pointers, so
`begin().base()` no longer compiles in `gtest_compressionCodec`.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=116787&sha=da3ff9339cf7c2a77486aca83edd682a26824bb2&name_0=PR&name_1=Build%20%28arm_tidy%29
PR: #116787

Co-Authored-By: Claude Fable 5 <[email protected]>
thevar1able added a commit that referenced this pull request Sep 2, 2026
In `release/23.x`, `GlobalISelMatchTable.cpp` was split into
`Common/GlobalISel/MatchTable/{MatchTable,Matchers,Types}.cpp`, and
`lib/Support/APFloat.cpp` now includes `shared/math.h` from the `libc`
project, so `${LLVM_SOURCE_DIR}/../libc` must be on the include path
(matching upstream `LLVMSupport`).

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=116787&sha=45de7279e5046c978ae85a97330864dcef89b327&name_0=PR&name_1=Build%20%28amd_binary%29
#116787

Co-Authored-By: Claude Fable 5 <[email protected]>
thevar1able added a commit that referenced this pull request Sep 2, 2026
`llvm::ConstantInt::get(type, -1)` implicitly truncates the sign-extended
value to the target width. LLVM 23 asserts that the value is representable
in the given bit width (`APInt.h:127`), so JIT compilation of `groupBitAnd`
aborted in debug builds for types narrower than 64 bits. Use
`llvm::Constant::getAllOnesValue` instead, which is exact for any width.

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=116787&sha=24ff9d93a336ff032a847bf46bb704bae2cea4a9&name_0=PR&name_1=Stateless%20tests%20(amd_debug,%20parallel)
PR: #116787

Co-Authored-By: Claude Fable 5 <[email protected]>
thevar1able added a commit that referenced this pull request Sep 2, 2026
With libc++ 23 headers, clang started inlining `getDataArrayAt` — including
its exception-construction path — into every call site. Across ~3600
`BSINumericIndexedVector` template instantiations this bloated
`FunctionsNumericIndexedVector.cpp.o` by ~2 MiB and nearly doubled its
compile time (the build profile diff flagged +6% object size, and locally
the TU went from 74 s to 134 s). Moving the `throw` into a `[[noreturn]]
NO_INLINE` helper restores both: 76 s and most of the size (measured with
clang 22.1.8, identical flags, only the libc++ headers swapped).

Report: #116787 (comment)
PR: #116787

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh clickhouse-gh Bot added the comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. label Sep 4, 2026
@thevar1able

Copy link
Copy Markdown
Member Author

Superseded by #117346

@thevar1able thevar1able closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. hold Skip for auto-updating. pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants