Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Jul 21, 2025

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

@github-actions github-actions bot mentioned this pull request Jul 21, 2025
@zyw-bot
Copy link
Collaborator Author

zyw-bot commented Jul 21, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@040bffc
patch: llvm/llvm-project#147065
sha256: b765b006af7146d7f6b0231d3887ec28cf1d0aba360408da91a5b1c6842ff709
commit: d115464

26 files changed, 6715 insertions(+), 6698 deletions(-)

Improvements:
  memdep.NumCacheCompleteNonLocalPtr 5690225 -> 5690237 +0.00%
  loop-vectorize.LoopsAnalyzed 2062880 -> 2062881 +0.00%
  last-run-tracking.NumSkippedPasses 51935269 -> 51935276 +0.00%
  early-cse.NumCSEGEP 14069195 -> 14069196 +0.00%
  memdep.NumUncacheNonLocalPtr 269924596 -> 269924597 +0.00%
Regressions:
  instcombine.NegatorMaxDepthVisited 20707 -> 20673 -0.16%
  basicaa.SearchLimitReached 5086 -> 5081 -0.10%
  instcombine.NegatorMaxTotalValuesVisited 64728 -> 64693 -0.05%
  instcombine.NegatorNumInstructionsCreatedTotal 68754 -> 68742 -0.02%
  instcombine.NumFactor 46718 -> 46711 -0.01%
  instcombine.NumReassoc 286769 -> 286749 -0.01%
  instcombine.NegatorMaxInstructionsCreated 17173 -> 17172 -0.01%
  reassociate.NumChanged 5221116 -> 5220888 -0.00%
  instcombine.NegatorNumTreesNegated 51895 -> 51893 -0.00%
  instcombine.NegatorNumInstructionsNegatedSuccess 63706 -> 63704 -0.00%

14 12 bench/cmake/optimized/huf_compress.ll
22 22 bench/cmake/optimized/zstd_decompress.ll
59 62 bench/darktable/optimized/export.ll
4 4 bench/darktable/optimized/print_settings.ll
34 32 bench/duckdb/optimized/huf_compress.ll
154 149 bench/ffmpeg/optimized/flac_picture.ll
10 9 bench/git/optimized/fast-import.ll
8 8 bench/libquic/optimized/s3_srvr.ll
52 54 bench/lief/optimized/ecjpake.ll
4 5 bench/lief/optimized/rsa.ll
107 111 bench/lief/optimized/ssl_tls.ll
11 10 bench/lief/optimized/ssl_tls13_client.ll
75 75 bench/lief/optimized/ssl_tls13_server.ll
64 61 bench/linux/optimized/decompress_unlzo.ll
37 37 bench/linux/optimized/zstd_decompress.ll
42 44 bench/openusd/optimized/zipFile.ll
25 25 bench/zstd/optimized/zstd_v07.ll

@github-actions
Copy link
Contributor

Here is a high-level summary of the most significant changes across the provided LLVM IR diffs:

  1. Removal of range Attribute from Function Signatures
    Several functions such as HUF_compress4X_usingCTable, HUF_compress1X_usingCTable_internal, and their duckdb_zstd variants have had the range(i64 -119, 262147) attribute removed from their return type declarations. This change indicates that the compiler is no longer explicitly informed about the expected numeric range of the return values, potentially affecting optimization decisions but not functionality.

  2. GEP and Pointer Arithmetic Reorganization
    In multiple functions (e.g., HUF_compress4X_usingCTable_internal, ZSTD_loadDEntropy, ff_flac_parse_picture, ssl3_send_new_session_ticket, and others), there are consistent changes replacing direct pointer arithmetic with combinations of ptrtoint and inttopt or restructuring GEP (getelementptr) usage. These changes suggest a shift from direct pointer-based addressing to more explicit integer-based pointer offset calculations, possibly to improve safety, enable better optimization, or meet updated aliasing/memory model constraints.

  3. Phi Node Adjustments in Control Flow
    Across several functions (HUF_compress4X_usingCTable_internal, ff_flac_parse_picture, ZSTD_loadDEntropy, ssl3_send_new_session_ticket, ssl_tls13_process_client_hello, etc.), phi nodes in .thread and other merge blocks have been updated to reflect new control flow paths or variable definitions. These changes often align with the pointer and arithmetic changes, ensuring correct SSA form after reordering or transformation of memory operations.

  4. Use of icmp ult Instead of Pointer Comparison Heuristics
    Some code sections (e.g., ff_flac_parse_picture, ssl_tls13_process_client_hello, ZSTD_loadDEntropy) replace direct pointer comparisons or complex arithmetic with icmp ult (unsigned less than) to perform bounds or validity checks. This improves clarity and aligns with LLVM's preferred way of handling pointer comparisons in a well-defined manner.

  5. Refactoring of Structured Memory Copy and Layout Logic
    In ff_flac_parse_picture, ssl3_send_new_session_ticket, and mbedtls_ssl_tls13_handshake_client_step, there are notable changes in how memory layout and copying are handled, including restructuring of pointer relationships, adjustments to offset calculations, and use of ptrtoint to compute distances between pointers. These changes often enhance correctness and maintainability of buffer handling logic.

Conclusion:

The changes reflect a consistent effort to modernize and stabilize memory and pointer handling in the IR, removing outdated or unsafe patterns (like direct pointer arithmetic), and replacing them with more robust constructs (like ptrtoint and icmp ult). These updates likely aim to improve compatibility with newer LLVM optimizations and stricter memory models, ensuring correctness and enabling better code generation.

model: qwen-plus-latest
CompletionUsage(completion_tokens=629, prompt_tokens=64398, total_tokens=65027, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Jul 22, 2025
@dtcxzyw dtcxzyw deleted the test-run16413723171 branch July 29, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants