Skip to content

Conversation

@dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Jun 13, 2025

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

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

dtcxzyw commented Jun 13, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@cc36533
patch: llvm/llvm-project#144065
sha256: 70d1bfb9ef5bc51de023d8fb3091cc818204be09d037bb5e4c1a0c7b1837e77d
commit: 87745c9

1615 files changed, 656027 insertions(+), 665643 deletions(-)

Improvements:
  instcombine.NegatorNumTreesNegated 50661 -> 51316 +1.29%
  instcombine.NegatorNumInstructionsNegatedSuccess 62473 -> 63128 +1.05%
  instcombine.NegatorNumInstructionsCreatedTotal 67568 -> 68223 +0.97%
  licm.NumAddSubHoisted 1317 -> 1326 +0.68%
  instcombine.NumFactor 46384 -> 46445 +0.13%
  basicaa.SearchLimitReached 5083 -> 5088 +0.10%
  instcombine.NumSunkInst 3555004 -> 3556488 +0.04%
  adce.NumRemoved 102966 -> 103003 +0.04%
  local.NumPHICSEs 203797 -> 203870 +0.04%
  licm.NumSunk 279569 -> 279661 +0.03%
Regressions:
  licm.NumGEPsHoisted 61474 -> 61085 -0.63%
  loop-simplifycfg.NumTerminatorsFolded 10650 -> 10643 -0.07%
  indvars.NumReplaced 72745 -> 72707 -0.05%
  instsimplify.NumReassoc 839423 -> 839130 -0.03%
  licm.NumHoisted 5629425 -> 5627772 -0.03%
  gvn.NumGVNEqProp 456517 -> 456457 -0.01%
  instcombine.NumReassoc 286531 -> 286503 -0.01%
  function-attrs.NumCapturesPartial 523316 -> 523275 -0.01%
  gvn.NumGVNInstr 159108 -> 159098 -0.01%
  gvn.NumGVNPRE 159108 -> 159098 -0.01%

3 5 bench/abc/optimized/giaDup.ll
6 2 bench/abc/optimized/giaTransduction.ll
41 42 bench/abc/optimized/ifDsd.ll
12 8 bench/abseil-cpp/optimized/container_test.ll
3 3 bench/actix-rs/optimized/5k5ycrtlwwxldg7.ll
2 4 bench/assimp/optimized/BaseImporter.ll
25 27 bench/bdwgc/optimized/gc.ll
36 34 bench/boost/optimized/default_filter_factory.ll
24 15 bench/boost/optimized/instantiate_cpp_grammar.ll
8 5 bench/boost/optimized/instantiate_re2c_lexer.ll
2 2 bench/box2d/optimized/imgui.ll
4 3 bench/bullet3/optimized/btSoftBodyHelpers.ll
13 15 bench/ceres/optimized/covariance_impl.ll
34 38 bench/ceres/optimized/eigensparse.ll
9 5 bench/clamav/optimized/entconv.ll
8 6 bench/clamav/optimized/htmlnorm.ll
23 16 bench/clamav/optimized/mbox.ll
18 16 bench/clamav/optimized/msdoc.ll
4 6 bench/cmake/optimized/archive_read_support_format_zip.ll
6 5 bench/cmake/optimized/cmListFileLexer.ll
10 8 bench/coreutils-rs/optimized/4jcegsvljtrqsq46.ll
54 55 bench/csmith/optimized/CGContext.ll
14 14 bench/darktable/optimized/colorchart.ll
6 6 bench/darktable/optimized/exif.ll
5 4 bench/darktable/optimized/imageop_math.ll
7 9 bench/darktable/optimized/piwigo.ll
6 4 bench/eastl/optimized/BenchmarkAlgorithm.ll
2 1 bench/eastl/optimized/EAMemory.ll
39 30 bench/eastl/optimized/EAString.ll
12 12 bench/elfshaker-rs/optimized/538k7v4jnxs1qgfredr4viqv4.ll
1 1 bench/elfshaker-rs/optimized/9g25xiovadbzz8leri5a9ttiq.ll
10 10 bench/ffmpeg/optimized/mpegts.ll
6 5 bench/ffmpeg/optimized/rtpenc_aac.ll
48 39 bench/ffmpeg/optimized/rtpenc_amr.ll
4 3 bench/fmt/optimized/enforce-checks-test.ll
14 8 bench/freetype/optimized/ftbase.ll
84 78 bench/freetype/optimized/type1.ll
17 19 bench/g2o/optimized/slam2d_linear.ll
30 35 bench/git/optimized/apply.ll
9 6 bench/git/optimized/credential.ll
41 51 bench/git/optimized/packfile.ll
4 4 bench/graphviz/optimized/dtstrhash.ll
7 11 bench/grpc/optimized/channel_stack.ll
24 28 bench/grpc/optimized/work_serializer.ll
10 12 bench/hdf5/optimized/H5Odrvinfo.ll
43 47 bench/hdf5/optimized/H5Oshmesg.ll
19 36 bench/hdf5/optimized/H5T.ll
12 11 bench/hermes/optimized/DependencyExtractor.ll
4 14 bench/hermes/optimized/HandleRootOwner.ll
13 12 bench/hermes/optimized/dtoa.ll
12 13 bench/hyperscan/optimized/mpv.ll
109 107 bench/hyperscan/optimized/ue2string.ll
14 11 bench/icu/optimized/collationiterator.ll
12 9 bench/icu/optimized/ufmt_cmn.ll
31 32 bench/icu/optimized/unistr.ll
22 28 bench/jemalloc/optimized/extent_dss.ll
7 7 bench/jq/optimized/decNumber.ll
13 12 bench/lean4/optimized/llnf.ll
16 15 bench/libigl/optimized/sort.ll
44 43 bench/libquic/optimized/dtoa.ll
9 9 bench/libquic/optimized/fd.ll
14 11 bench/libwebp/optimized/backward_references_cost_enc.ll
19 18 bench/lief/optimized/rsa.ll
56 72 bench/lightgbm/optimized/linear_tree_learner.ll
13 12 bench/llvm/optimized/AArch64FrameLowering.ll
3 1 bench/llvm/optimized/AArch64PBQPRegAlloc.ll
7 4 bench/llvm/optimized/ConstantFold.ll
4 2 bench/llvm/optimized/RegAllocPBQP.ll
11 8 bench/llvm/optimized/ScalarEvolution.ll
26 28 bench/meshlab/optimized/arap.ll
35 37 bench/meshlab/optimized/cube_style_single_iteration.ll
22 24 bench/meshlab/optimized/filter_unsharp.ll
2 1 bench/minetest/optimized/guiFormSpecMenu.ll
18 17 bench/mold/optimized/passes.cc.X86_64.ll
36 42 bench/nanobind/optimized/test_eigen.ll
17 16 bench/opencc/optimized/louds-trie.ll
3 1 bench/opencv/optimized/core_detect.ll
38 26 bench/openjdk/optimized/ifnode.ll
20 17 bench/openjdk/optimized/macro.ll
17 15 bench/openjdk/optimized/node.ll
26 20 bench/openjdk/optimized/split_if.ll
21 15 bench/openusd/optimized/stbImage.ll
5 6 bench/php/optimized/block_pass.ll
1 3 bench/php/optimized/cdf.ll
36 37 bench/php/optimized/zend_opcode.ll
47 46 bench/php/optimized/zend_strtod.ll
40 38 bench/pocketpy/optimized/pocketpy.ll
8 7 bench/pola-rs/optimized/1nb2gyhm0tinqn6ey8ai4djfd.ll
2 4 bench/postgres/optimized/oracle_compat.ll
34 36 bench/qemu/optimized/fdt_rw.ll
3 2 bench/quantlib/optimized/generalizedhullwhite.ll
27 31 bench/quantlib/optimized/localvolrndcalculator.ll
4 4 bench/quickjs/optimized/cutils.ll
76 64 bench/quickjs/optimized/quickjs.ll
22 16 bench/raylib/optimized/rtextures.ll
7 7 bench/re2/optimized/prog.ll
13 12 bench/redis/optimized/sds.ll
19 24 bench/regex-rs/optimized/1pxsmct4oxs5dlep.ll
27 31 bench/ruff-rs/optimized/4a0sesc153a050u04do7llz00.ll
25 27 bench/sdl/optimized/SDL_qsort.ll
13 14 bench/snappy/optimized/snappy.ll
7 8 bench/sqlite/optimized/sqlite3.ll
15 15 bench/typst-rs/optimized/2i78fvbm4wocuesi.ll
38 44 bench/uv-rs/optimized/bt5f6f08hvtjlcji6qu3dcjek.ll
10 6 bench/velox/optimized/Filter.ll
39 40 bench/wasmtime-rs/optimized/3r0osxvwe4cd326n.ll
4 2 bench/wireshark/optimized/qcustomplot.ll
7 3 bench/xgboost/optimized/updater_approx.ll
22 21 bench/z3/optimized/inj_axiom.ll
14 13 bench/z3/optimized/nlsat_explain.ll
17 16 bench/z3/optimized/polynomial.ll
61 63 bench/z3/optimized/upolynomial.ll
14 18 bench/zed-rs/optimized/axq0fnk57nrkchega3zj2zynp.ll
6 6 bench/zstd/optimized/zstd_double_fast.ll

@github-actions
Copy link
Contributor

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

  1. Pointer Comparison Elimination and Replacement with Integer Comparisons
    In several functions (e.g., giaDup.ll, container_test.ll, 5k5ycrtlwwxldg7.ll, etc.), pointer comparisons (icmp ult ptr %a, %b) have been replaced with integer-based checks (e.g., icmp eq i64 ..., icmp slt, icmp sgt). This suggests that the optimizer has removed pointer arithmetic-based conditions in favor of simpler or more canonical numeric comparisons, possibly improving code safety and reducing undefined behavior from pointer comparisons.

  2. Reduction in PHI Node Complexity and Reordering
    Multiple files show simplification of PHI nodes by reordering or removing unnecessary entries. For example, in giaTransduction.ll, PHI instructions now reference different predecessors, indicating possible loop restructuring or control flow simplification. This reduces register pressure and improves clarity for downstream passes.

  3. Loop Control Simplifications and Header Adjustments
    Several loops were adjusted to use simpler induction variables or preheaders (e.g., in clamav's htmlnorm.ll, mbox.ll, and boost's instantiate_re_relop_cpp_grammar.ll). These transformations suggest better loop normalization, such as inserting .preheader blocks and adjusting .lr.ph phi node inputs accordingly. This often leads to improved optimization opportunities like vectorization or unrolling.

  4. Memory Access Pattern Optimizations
    In bdwgc/optimized/gc.ll, fmt/optimized/enforce-checks-test.ll, and others, memory accesses were adjusted with new GEPs and pointer offset calculations. Some pointer bounds checks were simplified using bit manipulation or direct offset comparison, which may reduce overhead during runtime memory operations.

  5. Dead Code Removal and Phi Merging
    Across multiple benchmarks (e.g., coreutils-rs/538k7v4jnxs1qgfredr4viqv4.ll, git/apply.ll, hdf5/H5T.ll), unreachable paths were trimmed and redundant phi nodes merged. For instance, labels that led to unconditional branches were removed, and phi nodes were simplified by eliminating unused or redundant incoming values. This reduces code size and complexity without affecting logic.

These optimizations appear to be part of general cleanups and improvements performed during instruction combining, loop canonicalization, and dead code elimination phases. They likely result in performance gains and safer code by replacing ambiguous pointer arithmetic with clearer value-based logic and simplifying control flow graphs.

model: qwen-plus-latest
CompletionUsage(completion_tokens=547, prompt_tokens=106802, total_tokens=107349, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Aug 2, 2025
@dtcxzyw dtcxzyw deleted the test-run15635074333 branch August 2, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants