Skip to content

Conversation

@dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Jun 6, 2025

Link: llvm/llvm-project#142869
Requested by: @dtcxzyw

@github-actions github-actions bot mentioned this pull request Jun 6, 2025
@dtcxzyw
Copy link
Owner Author

dtcxzyw commented Jun 6, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@678cdd6
patch: llvm/llvm-project#142869
sha256: f3f458c999109aa4ffee3a320122de4552d54998b29eb1cc8d116b2110425e30
commit: e8c04e6

71 files changed, 94604 insertions(+), 96048 deletions(-)

Improvements:
  correlated-value-propagation.NumSaturating 2892 -> 2900 +0.28%
  correlated-value-propagation.NumSubNUW 39275 -> 39283 +0.02%
  correlated-value-propagation.NumSubNW 122405 -> 122421 +0.01%
  correlated-value-propagation.NumSubNSW 83607 -> 83615 +0.01%
  instcombine.NumReassoc 286280 -> 286307 +0.01%
  correlated-value-propagation.NumAddNSW 280768 -> 280786 +0.01%
  correlated-value-propagation.NumNNeg 105547 -> 105553 +0.01%
  correlated-value-propagation.NumPhis 1357206 -> 1357282 +0.01%
  instcombine.NegatorMaxDepthVisited 20517 -> 20518 +0.00%
  instcombine.NumDeadInst 45379011 -> 45380834 +0.00%
Regressions:
  sccp.NumInstRemoved 2095867 -> 2095452 -0.02%
  gvn.NumGVNInstr 160543 -> 160513 -0.02%
  gvn.NumGVNPRE 160543 -> 160513 -0.02%
  licm.NumMovedCalls 35465 -> 35459 -0.02%
  reassociate.NumChanged 5216399 -> 5215629 -0.01%
  sccp.NumDeadBlocks 751297 -> 751211 -0.01%
  deadargelim.NumArgumentsEliminated 20048 -> 20047 -0.00%
  simplifycfg.NumSinkCommonCode 389341 -> 389326 -0.00%
  bdce.NumRemoved 396451 -> 396438 -0.00%
  correlated-value-propagation.NumShlNSW 126849 -> 126845 -0.00%

55 61 bench/abc/optimized/aigRet.ll
54 57 bench/abc/optimized/cecSatG3.ll
52 68 bench/abc/optimized/dauTree.ll
14 16 bench/abc/optimized/giaDup.ll
54 58 bench/abc/optimized/giaGen.ll
24 27 bench/abc/optimized/plaMan.ll
15 23 bench/abc/optimized/wlcNtk.ll
6 9 bench/arrow/optimized/builder_primitive.ll
59 72 bench/arrow/optimized/compare.ll
23 32 bench/arrow/optimized/int_util.ll
61 79 bench/arrow/optimized/list_util.ll
23 32 bench/arrow/optimized/scalar_cast_string.ll
36 39 bench/delta-rs/optimized/4say4x9grcidoih4.ll
136 142 bench/duckdb/optimized/bignum.ll
295 337 bench/folly/optimized/Symbolizer.ll
41 44 bench/git/optimized/pack-bitmap.ll
14 17 bench/image-rs/optimized/2mngkegtim1o10y3.ll
51 47 bench/influxdb-rs/optimized/1qfvsl8a7jfomqbf.ll
22 25 bench/lief/optimized/bignum_core.ll
18 21 bench/oiio/optimized/Codec.ll
41 50 bench/pola-rs/optimized/0vhch0fuxqefukqucblhsujir.ll
116 128 bench/pola-rs/optimized/2zzsdlmtuqz1lzylvupupdnd9.ll
48 51 bench/pola-rs/optimized/79mthl535kfgm5ahqdg43dgbx.ll
41 56 bench/pola-rs/optimized/8iz4w28nkww70r589pc3f77b4.ll
12 15 bench/pola-rs/optimized/90bdyry49xwqsl9ia2234gmqh.ll
5 8 bench/pola-rs/optimized/dfnuuwew9rjefyx0hf8efvszi.ll
4 10 bench/quiche-rs/optimized/06b42xxedqi52uuzk83asr46k.ll
100 112 bench/ripgrep-rs/optimized/544b63jf571x6ld1.ll
35 38 bench/ruby/optimized/regexec.ll
70 82 bench/ruff-rs/optimized/9ezhgv3vaoku7b96fwwr4f701.ll
62 74 bench/ruff-rs/optimized/e2ejosr9keyhzyna9ksx8o1ej.ll
91 103 bench/tokenizers-rs/optimized/1w676x6x6lprwvn5.ll
3 6 bench/wireshark/optimized/packet-gcsna.ll
16 22 bench/wireshark/optimized/packet-tetra.ll
41 45 bench/z3/optimized/sat_clause.ll

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

Here's a high-level summary of the most significant changes in this LLVM IR patch, focusing on up to 5 major transformations:

  1. Optimized Bit/Byte Counting and Alignment Calculations
    Multiple instances of shifts, masks, and conditional adds are restructured for better alignment calculations (e.g., replacing lshr + and + zext + add sequences with more efficient combinations like add + lshr). This appears in several functions including memory buffer management and bit manipulation routines, likely improving efficiency in dynamic resizing or allocation logic.

  2. Refactored Memory Allocation Logic
    In functions like Vec_BitGrow, Cec5_ManExtend, and Pla_ManPrimesTable, memory allocation and reallocation logic has been rewritten using simplified pointer arithmetic and updated constants. These changes aim at reducing overhead in buffer size estimation and possibly fixing or improving alignment handling during allocations.

  3. Updated PHI Node Labels and Branch Merging
    Several .lr.ph and .loopexit blocks have their PHI node inputs reordered or relabeled to match new control flow structures. This reflects changes in loop structure and exit merging logic, likely due to improved branching or layout optimizations that change predecessor block order.

  4. Reduction in Conditional Checks and Simplification of Phi Nodes
    The code simplifies conditionals involving bitmask checks and null pointers, especially around buffer and array operations. Some branches were removed entirely, and phi nodes were reduced or consolidated where one predecessor was constant or redundant, leading to cleaner exits and merge points.

  5. Enhanced Register Usage and Elimination of Redundant Loads
    There is evidence of better register allocation and fewer redundant loads from memory in critical paths (e.g., %1.sroa.0.lcssa and similar values are reused). This indicates local variable promotion or SROA (Scalar Replacement of Aggregates) improvements, reducing stack usage and increasing performance in inner loops.

These changes suggest an overall optimization effort focused on bit manipulation, memory allocation efficiency, and control flow simplification, which would benefit performance in low-level data processing and array/buffer manipulation routines.

model: qwen-plus-latest
CompletionUsage(completion_tokens=443, prompt_tokens=115585, total_tokens=116028, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Jun 6, 2025
@dtcxzyw dtcxzyw deleted the test-run15484454141 branch June 6, 2025 15:47
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.

1 participant