Skip to content

pre-commit: PR134712 #2244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

pre-commit: PR134712 #2244

wants to merge 3 commits into from

Conversation

dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Apr 9, 2025

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

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

dtcxzyw commented Apr 9, 2025

Diff mode

runner: ariselab-64c-v2
baseline: llvm/llvm-project@f46d641
patch: llvm/llvm-project#134712
sha256: 766f110955a16e125de6c64cc83f7c6cd06fda5970a0cdff752d33c481aa602d
commit: 0e320ba

11728 files changed, 23367619 insertions(+), 24618099 deletions(-)

Improvements:
  adce.NumBranchesRemoved 21168 -> 23794 +12.41%
  instcombine.NumConstProp 129921 -> 142335 +9.56%
  adce.NumRemoved 93457 -> 99964 +6.96%
  globalopt.NumLocalized 16 -> 17 +6.25%
  correlated-value-propagation.NumUDivURemsNarrowed 10131 -> 10649 +5.11%
  loop-delete.NumDeleted 103654 -> 108690 +4.86%
  loop-delete.NumBackedgesBroken 43532 -> 45074 +3.54%
  loop-simplifycfg.NumLoopBlocksDeleted 5523 -> 5652 +2.34%
  gvn.NumGVNBlocks 179715 -> 183746 +2.24%
  simple-loop-unswitch.NumInvariantConditionsInjected 46 -> 47 +2.17%
Regressions:
  aggressive-instcombine.NumExprsReduced 19275 -> 17436 -9.54%
  aggressive-instcombine.NumInstrsReduced 59769 -> 55139 -7.75%
  reassociate.NumAnnihil 680 -> 638 -6.18%
  loop-load-elim.NumLoopLoadEliminted 1392 -> 1325 -4.81%
  indvars.NumReplaced 60735 -> 58055 -4.41%
  basicaa.SearchLimitReached 30828 -> 29830 -3.24%
  correlated-value-propagation.NumPhiCommon 49850 -> 48293 -3.12%
  gvn.NumGVNEqProp 356602 -> 348971 -2.14%
  bdce.NumSimplified 5342 -> 5234 -2.02%
  instcombine.NumFactor 39308 -> 38556 -1.91%

0 2 bench/abc/optimized/absVta.ll
3 4 bench/abseil-cpp/optimized/cordz_info.ll
5 11 bench/abseil-cpp/optimized/int128_test.ll
20 19 bench/actix-rs/optimized/19s5ghr2x6s6bmh4.ll
2 3 bench/actix-rs/optimized/2f4ardqpkkrvo3qj.ll
16 18 bench/actix-rs/optimized/kyfmdxbalxu1s84.ll
10 16 bench/annoy/optimized/annoymodule.ll
10 12 bench/arrow/optimized/counting_semaphore.ll
3 8 bench/arrow/optimized/os.ll
5 7 bench/assimp/optimized/MakeVerboseFormat.ll
15 16 bench/boost/optimized/benchmark_fstream.ll
1 10 bench/boost/optimized/mo_lambda.ll
8 12 bench/box2d/optimized/shape.ll
5 7 bench/box2d/optimized/x11_window.ll
22 25 bench/brotli/optimized/brotli.ll
1 2 bench/c3c/optimized/llvm_codegen_type.ll
10 17 bench/c3c/optimized/project_creation.ll
4 3 bench/c3c/optimized/types.ll
5 8 bench/casadi/optimized/dm_instantiator.ll
5 4 bench/ceres/optimized/block_jacobi_preconditioner.ll
8 7 bench/ceres/optimized/schur_eliminator_2_d_d.ll
3 2 bench/clamav/optimized/aspack.ll
2 7 bench/clap-rs/optimized/28kpmq8k0hu4re4f.ll
3 4 bench/clap-rs/optimized/3b4nqkxyl1xqdcre.ll
2 4 bench/diesel-rs/optimized/1dr0ikhoh8prk7sr.ll
6 10 bench/diesel-rs/optimized/24idv9j1r56qvsu.ll
21 32 bench/egg-rs/optimized/2fp1d0strj8iokyf.ll
7 13 bench/entt/optimized/version.ll
19 22 bench/flac/optimized/encode.ll
2 5 bench/flac/optimized/replaygain_synthesis.ll
7 9 bench/flatbuffers/optimized/idl_gen_cpp.ll
9 4 bench/folly/optimized/DistributedMutex.ll
4 7 bench/folly/optimized/ElfCache.ll
8 9 bench/folly/optimized/Format.ll
7 6 bench/freetype/optimized/ftcache.ll
11 12 bench/freetype/optimized/psaux.ll
6 23 bench/g2o/optimized/vertex_ellipse.ll
2 4 bench/git/optimized/daemon.ll
3 4 bench/glslang/optimized/ShaderLang.ll
1 3 bench/hermes/optimized/CodeCoverageProfiler.ll
4 8 bench/html5ever-rs/optimized/19ci5iy6gkdi8zuj.ll
8 15 bench/hwloc/optimized/pci-common.ll
24 36 bench/influxdb-rs/optimized/1s5ibqekmzia6ibu.ll
13 18 bench/influxdb-rs/optimized/3k3vgyqcou07q2z6.ll
7 14 bench/influxdb-rs/optimized/4xdswox27ronf9w0.ll
3 9 bench/jemalloc/optimized/pa.ll
4 13 bench/jemalloc/optimized/pac.ll
7 8 bench/jsonnet/optimized/formatter.ll
7 9 bench/libevent/optimized/event.ll
12 25 bench/libjpeg-turbo/optimized/jdlhuff.ll
13 16 bench/libphonenumber/optimized/stringutil.ll
3 5 bench/libpng/optimized/pngmem.ll
3 8 bench/libquic/optimized/gzwrite.ll
2 8 bench/libsodium/optimized/codecs.ll
4 10 bench/libuv/optimized/strscpy.ll
4 5 bench/libzmq/optimized/ip_resolver.ll
6 9 bench/lightgbm/optimized/boosting.ll
2 4 bench/llama.cpp/optimized/llama-kv-cache.ll
15 24 bench/lodepng/optimized/lodepng_util.ll
5 10 bench/logos-rs/optimized/1w5j7pvycf8p27lv.ll
7 8 bench/logos-rs/optimized/4pdh61scdnltfxqx.ll
13 14 bench/logos-rs/optimized/51e3klwwljv15fz2.ll
21 46 bench/lua/optimized/lobject.ll
42 49 bench/luajit/optimized/lj_tab.ll
3 5 bench/luau/optimized/lbuiltins.ll
14 25 bench/luau/optimized/lcorolib.ll
2 17 bench/lvgl/optimized/lv_obj_tree.ll
5 4 bench/memcached/optimized/items.ll
4 10 bench/mimalloc/optimized/prim.ll
2 4 bench/mini-lsm-rs/optimized/1m9jerzd56wr2irm.ll
24 28 bench/mini-lsm-rs/optimized/211qm7emy1a6xqse.ll
9 14 bench/mitsuba3/optimized/jitallocator.ll
24 38 bench/msdfgen/optimized/Scanline.ll
7 8 bench/ncnn/optimized/copyto.ll
7 8 bench/ncnn/optimized/crop.ll
10 24 bench/nghttp2/optimized/nghttp2_frame.ll
9 6 bench/nghttp2/optimized/nghttp2_hd.ll
8 14 bench/nix/optimized/names.ll
8 10 bench/nuttx/optimized/task_setup.ll
14 16 bench/oiio/optimized/deepdata.ll
6 12 bench/openblas/optimized/dgesvj.ll
6 7 bench/openblas/optimized/dtpmv_NLN.ll
1 4 bench/opencv/optimized/camshift.ll
5 6 bench/openexr/optimized/coding.ll
2 1 bench/openmpi/optimized/pmix_client_fabric.ll
24 56 bench/openvdb/optimized/FindActiveValues.ll
8 15 bench/openvdb/optimized/TempFile.ll
29 34 bench/ozz-animation/optimized/options.ll
4 6 bench/pocketpy/optimized/compiler.ll
7 13 bench/pocketpy/optimized/modules.ll
9 10 bench/protobuf/optimized/extension_set.ll
8 13 bench/protobuf/optimized/java_features.pb.ll
6 12 bench/qdrant-rs/optimized/242gbngcvruxs88t.ll
7 15 bench/qemu/optimized/gdbstub.ll
5 9 bench/qemu/optimized/tcg-op-gvec.ll
33 39 bench/quickjs/optimized/quickjs-libc.ll
6 20 bench/re2/optimized/dfa.ll
7 11 bench/regex-rs/optimized/10eccrragw6uslmk.ll
10 12 bench/regex-rs/optimized/5gojg14e35fgi63k.ll
24 23 bench/ripgrep-rs/optimized/kiwlvuwlry6renb.ll
5 6 bench/rustfmt-rs/optimized/llbxf4pclolbp5s.ll
9 27 bench/sentencepiece/optimized/strutil.ll
9 13 bench/sentencepiece/optimized/zero_copy_stream_impl_lite.ll
4 8 bench/serde-rs-json/optimized/19be4mv19oulzif3.ll
14 18 bench/softposit-rs/optimized/4x7uq85ym1obejw4.ll
7 11 bench/stat-rs/optimized/2y2d191rk1p8v5y4.ll
7 17 bench/stb/optimized/stb_divide.ll
14 18 bench/taskflow/optimized/parallel_sort.ll
18 36 bench/tokenizers-rs/optimized/10h1ju7dwsvagf79.ll
19 23 bench/tokenizers-rs/optimized/2w5yihn8z6xjncvn.ll
1 4 bench/tokio-rs/optimized/akiz5wks12hp4ug.ll
10 17 bench/tokio-rs/optimized/r9h5225tdo2hxm6.ll
11 14 bench/tree-sitter-rs/optimized/3akexam875pc2p1h.ll
10 22 bench/turborepo-rs/optimized/2nr6c96xnmy9oph33ghqn67cs.ll
2 6 bench/turborepo-rs/optimized/43mxnq5l18zt2wz7kzlj45feg.ll
7 10 bench/vcpkg/optimized/commands.list.ll
14 23 bench/verilator/optimized/V3AstNodes.ll
5 8 bench/wasmedge/optimized/vinode.ll
8 23 bench/wolfssl/optimized/chacha20_poly1305.ll
8 14 bench/xgboost/optimized/context.ll
10 16 bench/xgboost/optimized/input_split_base.ll
14 29 bench/yalantinglibs/optimized/test_messages_proto2.pb.ll
30 62 bench/yalantinglibs/optimized/test_messages_proto3.pb.ll
7 22 bench/zfp/optimized/bitstream.ll
9 12 bench/zlib/optimized/gzwrite.ll
21 25 bench/zstd/optimized/entropy_common.ll
19 20 bench/zstd/optimized/zstd_v06.ll

Copy link
Contributor

github-actions bot commented Apr 9, 2025

Here is a summary of the major changes in the LLVM IR diffs:

  1. Phi Node Simplifications:

    • Many phi nodes have been simplified or removed, particularly where they were previously calculating values that are now directly passed as constants (e.g., 0, 1, etc.). This reduces unnecessary computations and improves clarity.
    • For example, in b/bench/influxdb-rs/optimized/3k3vgyqcou07q2z6.ll, phi nodes for %spec.select.i and %storemerge have been replaced with simpler constants.
  2. Reduction of Unnecessary Instructions:

    • Several instructions, such as icmp, select, and arithmetic operations (add, sub, mul, etc.), have been eliminated when their results were not being used effectively.
    • In b/bench/clap-rs/optimized/3b4nqkxyl1xqdcre.ll, the select instruction for %.val.i.pre94.mux was removed because its result was unused.
  3. Memory Operations Adjustments:

    • Memory operations like llvm.memmove and llvm.memset have been adjusted to use more precise alignment flags (nonnull and nuw) or to directly pass constants instead of computed values.
    • In b/bench/folly/optimized/DistributedMutex.ll, llvm.memmove was replaced with a direct store operation using constant values.
  4. Function Attribute Updates:

    • Function attributes have been updated to include noundef where applicable, improving optimization opportunities by ensuring arguments are well-defined.
    • For instance, in b/bench/freetype/optimized/psaux.ll, the function @cf2_hintmap_map now uses noundef attributes for better static analysis.
  5. Control Flow Simplifications:

    • Control flow has been streamlined by removing redundant branches and merging basic blocks where possible.
    • In b/bench/libquic/optimized/gzwrite.ll, the .critedge block was merged into the .thread190 block, reducing unnecessary jumps.

These changes collectively aim to simplify the control flow, reduce redundant computations, and improve memory operation precision, leading to potentially better performance and smaller binary sizes. The removal of unnecessary phi nodes and simplification of arithmetic operations contribute to cleaner and more efficient code generation. Additionally, updating function attributes ensures stricter adherence to defined behaviors, enabling further optimizations.

model: qwen-plus-latest
CompletionUsage(completion_tokens=518, prompt_tokens=118311, total_tokens=118829, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Apr 9, 2025
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.

1 participant