Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

pre-commit: PR181615 - #3469

Closed
zyw-bot wants to merge 3 commits into
mainfrom
test-run22056708573
Closed

zyw-bot wants to merge 3 commits into
mainfrom
test-run22056708573

Conversation

@zyw-bot

@zyw-bot zyw-bot commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator

Link: llvm/llvm-project#181615
Requested by: @nikic

@github-actions github-actions Bot mentioned this pull request Feb 16, 2026
@zyw-bot

zyw-bot commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator Author

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@820d15c
patch: llvm/llvm-project#181615
sha256: 2d90be85397bea2a38d70d6b4f111a09b23dd1a5cbf94512e047e89443f6a2eb
commit: 8ebd090

145 files changed, 3796 insertions(+), 3557 deletions(-)

Improvements:
  func-properties-stats.NumStoreInstCount 23200994 -> 23201241 +0.00%
  instcount.NumStoreInst 23200994 -> 23201241 +0.00%
  dse.NumRemainingStores 43981450 -> 43981713 +0.00%
  instcount.NumSExtInst 875302 -> 875304 +0.00%
  func-properties-stats.NumTopLevelLoopCount 1682952 -> 1682954 +0.00%
  function-attrs.NumWriteOnlyArg 929489 -> 929490 +0.00%
  loop-vectorize.LoopsAnalyzed 1947468 -> 1947470 +0.00%
  attributor.NumAAs 3944041 -> 3944045 +0.00%
  func-properties-stats.NumTotalInstructionCount 278247625 -> 278247870 +0.00%
  instcount.TotalInsts 278247625 -> 278247870 +0.00%
Regressions:
  dse.NumRedundantStores 36265 -> 36017 -0.68%
  loop-delete.NumDeleted 112314 -> 112312 -0.00%
  licm.NumMovedLoads 621917 -> 621913 -0.00%
  dse.NumFastStores 1093516 -> 1093512 -0.00%
  dse.NumGetDomMemoryDefPassed 1298932 -> 1298928 -0.00%
  simplifycfg.NumHoistCommonInstrs 2496426 -> 2496420 -0.00%
  capture-tracking.NumCapturedBefore 16174121 -> 16174084 -0.00%
  simplifycfg.NumHoistCommonCode 879016 -> 879014 -0.00%
  capture-tracking.NumNotCapturedBefore 19389225 -> 19389202 -0.00%
  licm.NumHoisted 5269734 -> 5269728 -0.00%

+42 postgres/planner.ll
+29 arrow/api_scalar.ll
+15 arrow/api_vector.ll
+7 arrow/api_aggregate.ll
+6 luau/Config.ll
+5 arrow/pretty_print.ll
+4 boost/sparring_partner.ll
+4 syn/19z3k5eqgbxjiezn.ll
+4 z3/qe_arith_plugin.ll
+3 arrow/expression.ll
+2 abseil-cpp/gtest-all.ll
+2 ozz-animation/jsoncpp.ll
+1 abc/gtest-all.ll
-1 git/revision.ll
-2 linux/auditsc.ll
-5 cpython/_lsprof.ll
-6 openjdk/jvmtiAgentList.ll
-8 llvm/InstrProfReader.ll
-8 llvm/TypeRecordMapping.ll
-20 llvm/StandardInstrumentations.ll

@github-actions

Copy link
Copy Markdown
Contributor

This patch introduces several targeted optimizations and correctness fixes across multiple LLVM IR files, primarily focused on improving string handling, memory layout, and control flow in C++ standard library std::string-related code paths. The major changes are:

  1. Addition of Pointer Stores to String Data Members: In numerous StringifyImpl, CodePointToUtf8, and append-related functions (across gtest, abseil-cpp, arrow, boost, luau, jsoncpp, etc.), new store ptr %X, ptr %Y, align 8 instructions are inserted to explicitly store a pointer (typically the string’s character buffer) into the string object’s first field (e.g., %6, %23, %59). This reflects correct initialization of the small-string optimization (SSO) vs. heap-allocated buffer pointer, ensuring the string object’s internal state is fully and consistently updated.

  2. Reordering and Fixing of append-Related Stores in abseil-cpp: In _ZNSt7__cxx1112basic_string...6append..., multiple getelementptr and store instructions are reordered and retargeted — notably swapping operand order in GEPs and updating store destinations (e.g., %65 instead of %66) — to correctly update the string’s capacity/size fields and data pointer, aligning with ABI expectations for std::string’s layout and avoiding stale or misaligned writes.

  3. Elimination of Redundant Null Stores: Several files (_lsprof.ll, auditsc.ll, jvmtiAgentList.ll, revision.ll, InstrProfReader.ll, TypeRecordMapping.ll, z3/qe_arith_plugin.ll) remove unnecessary store ptr null or store i32 0 instructions that were previously emitted before unconditional branches or redundant destructors. These were likely dead or duplicated stores, and their removal reduces code size and improves correctness.

  4. Control Flow Simplification in Error Handling: In InstrProfReader.ll and TypeRecordMapping.ll, error-handling blocks (_ZN4llvm5ErrorD2Ev.exit*) are simplified by removing conditional loads and early-exit branches, merging logic into a single .critedge or 20 block. This eliminates redundant null checks and stores, relying instead on structured phi-based control flow — improving both readability and optimization potential.

  5. Loop and Phi Node Refinements in postgres/planner.ll: A significant restructuring of list traversal logic replaces simple loops with split, nested, and predicated loop variants (.split.us.us, .split.us.us.us123, etc.), introducing new induction variables and phis. This enables more precise alias analysis and vectorization opportunities for list processing, particularly in planner path generation.

All changes preserve functional correctness while refining memory access patterns, eliminating redundancy, and enabling better downstream optimization. No semantic changes to algorithms or APIs are introduced.

model: qwen-plus-latest
CompletionUsage(completion_tokens=636, prompt_tokens=33924, total_tokens=34560, completion_tokens_details=None, prompt_tokens_details=None)

%18 = getelementptr inbounds nuw i8, ptr %9, i64 8
%19 = getelementptr inbounds nuw i8, ptr %4, i64 8
store i64 %15, ptr %19, align 8, !tbaa !25, !alias.scope !982
store ptr %12, ptr %9, align 8, !tbaa !22

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Various regressions like this. It's a single-predecessor idom here.

@nikic

nikic commented Feb 16, 2026

Copy link
Copy Markdown

/close

@github-actions github-actions Bot closed this Feb 16, 2026
@dtcxzyw
dtcxzyw deleted the test-run22056708573 branch February 21, 2026 06:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants