Skip to content

pre-commit: PRnikic/llvm-project/commit/4c445a574407ac7b59df567cf85a9a0e1c0e2bda #2300

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Apr 23, 2025

Link: nikic/llvm-project@4c445a5
Requested by: @nikic

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

dtcxzyw commented Apr 23, 2025

Diff mode

runner: ariselab-64c-v2
baseline: llvm/llvm-project@5afe859
patch: nikic/llvm-project@4c445a5
sha256: 55dbf487244b895452a01fdb8c57a20c265232f90324c7dabec3909b4261ff7f
commit: 3cb07bd

5325 files changed, 6411992 insertions(+), 6430454 deletions(-)

Improvements:
  basicaa.SearchLimitReached 34556 -> 53740 +55.52%
  simplifycfg.NumHoistCommonCode 603902 -> 605762 +0.31%
  local.NumPHICSEs 156944 -> 157379 +0.28%
  licm.NumSunk 263894 -> 264413 +0.20%
  correlated-value-propagation.NumPhis 1111931 -> 1113739 +0.16%
  simplifycfg.NumHoistCommonInstrs 1793734 -> 1796622 +0.16%
  gvn.NumPRELoadMoved2CEPred 78304 -> 78364 +0.08%
  dse.NumFastOther 142595 -> 142704 +0.08%
  memory-builtins.ObjectVisitorLoad 1858611 -> 1859965 +0.07%
  instcombine.NumReassoc 252912 -> 252996 +0.03%
Regressions:
  licm.NumGEPsHoisted 48404 -> 15586 -67.80%
  licm.NumHoisted 4574354 -> 4531000 -0.95%
  instcombine.NegatorTotalNegationsAttempted 19077056 -> 19061190 -0.08%
  instcombine.NegatorNumValuesVisited 19830813 -> 19814942 -0.08%
  adce.NumRemoved 93349 -> 93287 -0.07%
  dse.NumCFGChecks 520870 -> 520570 -0.06%
  adce.NumBranchesRemoved 20814 -> 20808 -0.03%
  instcombine.NumCombined 105572846 -> 105546295 -0.03%
  memdep.NumCacheCompleteNonLocalPtr 4738065 -> 4737126 -0.02%
  memdep.NumCacheNonLocalPtr 222944881 -> 222910811 -0.02%

2 3 bench/abc/optimized/extraUtilMult.ll
2 3 bench/abc/optimized/giaCex.ll
3 4 bench/abc/optimized/giaGen.ll
14 22 bench/abc/optimized/giaMuxes.ll
3 4 bench/abc/optimized/verFormula.ll
24 36 bench/abseil-cpp/optimized/status_internal.ll
14 18 bench/actix-rs/optimized/1a89q5mj3jl9opyq.ll
13 17 bench/assimp/optimized/UniqueNameGenerator.ll
8 16 bench/assimp/optimized/ValidateDataStructure.ll
5 4 bench/boost/optimized/exit_argc.ll
28 26 bench/boost/optimized/named_scope_format_parser.ll
15 14 bench/box2d/optimized/linux_joystick.ll
18 17 bench/brotli/optimized/compound_dictionary.ll
20 28 bench/bullet3/optimized/b3DNA.ll
1 2 bench/bullet3/optimized/btConvexHull.ll
41 46 bench/casadi/optimized/polynomial.ll
56 51 bench/chibicc/optimized/unicode.ll
8 11 bench/cmake/optimized/cmCPackIFWRepository.ll
16 24 bench/cmake/optimized/cmComputeLinkDepends.ll
15 19 bench/coreutils-rs/optimized/1efo3swtygw8gpnj.ll
30 35 bench/coreutils-rs/optimized/3wh8t8l0mi6tzx9q.ll
1 2 bench/cpython/optimized/longobject.ll
31 33 bench/curl/optimized/fopen.ll
21 24 bench/cvc5/optimized/conjecture_generator.ll
6 4 bench/darktable/optimized/introspection_lowlight.ll
9 8 bench/darktable/optimized/introspection_rawdenoise.ll
9 12 bench/darktable/optimized/slideshow.ll
23 22 bench/delta-rs/optimized/1cpha5e75mq7zwcw.ll
8 6 bench/delta-rs/optimized/2n0ez5zuwgs53clg.ll
16 19 bench/duckdb/optimized/ub_duckdb_parquet_writers.ll
18 20 bench/eastl/optimized/BenchmarkVector.ll
20 19 bench/entt/optimized/memory.ll
14 13 bench/faiss/optimized/test_sliding_ivf.ll
57 55 bench/flac/optimized/window.ll
21 20 bench/g2o/optimized/edge_se2_odom_differential_calib.ll
30 28 bench/g2o/optimized/edge_se2_pointxy.ll
19 18 bench/g2o/optimized/sparse_optimizer.ll
31 30 bench/git/optimized/lockfile.ll
8 11 bench/git/optimized/setup.ll
37 35 bench/graphviz/optimized/index.ll
14 18 bench/graphviz/optimized/pack.ll
3 4 bench/gromacs/optimized/manyautocorrelation.ll
7 11 bench/gromacs/optimized/pdb2top.ll
10 9 bench/hdf5/optimized/H5.ll
32 31 bench/hdf5/optimized/h5diff_util.ll
3 2 bench/hermes/optimized/TargetParser.ll
4 8 bench/hermes/optimized/hbc-deltaprep.ll
40 48 bench/html5ever-rs/optimized/20v7r6b5z18v5dgl.ll
5 8 bench/hyperscan/optimized/flood_compile.ll
5 6 bench/icu/optimized/uniset_props.ll
84 80 bench/ipopt/optimized/IpSymTMatrix.ll
11 10 bench/just-rs/optimized/4mdvpwvrpdu4jonv.ll
3 2 bench/libjpeg-turbo/optimized/jquant1.ll
21 20 bench/libphonenumber/optimized/stringutil_test.ll
16 17 bench/libwebp/optimized/filters.ll
23 24 bench/lief/optimized/sha1.ll
6 2 bench/lightgbm/optimized/dataset.ll
3 4 bench/lightgbm/optimized/gradient_discretizer.ll
9 13 bench/linux/optimized/regmap.ll
31 29 bench/llama.cpp/optimized/ggml-cpu.ll
12 8 bench/llvm/optimized/RISCVTargetParser.ll
10 13 bench/lua/optimized/lutf8lib.ll
7 6 bench/luau/optimized/lbuiltins.ll
30 28 bench/lvgl/optimized/lv_ime_pinyin.ll
7 15 bench/lvgl/optimized/lv_obj_style.ll
6 7 bench/lvgl/optimized/lv_obj_tree.ll
11 10 bench/meilisearch-rs/optimized/2bqmf34tdvo23w8l.ll
22 21 bench/meshlab/optimized/filter_sdfgpu.ll
13 16 bench/minetest/optimized/CColorConverter.ll
29 34 bench/mini-lsm-rs/optimized/1zm93ee80v61t4c3.ll
30 38 bench/mini-lsm-rs/optimized/3l74wehtlfae5jz1.ll
10 8 bench/mold/optimized/cmdline.cc.X86_64.ll
31 29 bench/msgpack/optimized/class_intrusive.ll
31 29 bench/msgpack/optimized/msgpack_variant_capitalize.ll
2 1 bench/node/optimized/libnode.node.ll
9 8 bench/nuttx/optimized/lib_basename.ll
6 7 bench/ocio/optimized/FileFormat3DL.ll
6 7 bench/ocio/optimized/FileFormatTruelight.ll
45 57 bench/ockam-rs/optimized/189wgg1obirl4k4t.ll
8 7 bench/openblas/optimized/dorgtsqr.ll
7 11 bench/opencv/optimized/caffe_importer.ll
6 5 bench/opencv/optimized/infer_ssd_onnx.ll
3 4 bench/openexr/optimized/ImfIDManifest.ll
13 12 bench/openexr/optimized/all.ll
10 9 bench/openjdk/optimized/jvmtiEventController.ll
9 8 bench/openjdk/optimized/mlib_ImageCreate.ll
20 23 bench/openjdk/optimized/objectStartArray.ll
4 6 bench/openspiel/optimized/gin_rummy_utils.ll
5 9 bench/openspiel/optimized/ultimate_tic_tac_toe.ll
11 9 bench/openssl/optimized/filterprov.ll
6 8 bench/openusd/optimized/simplify.ll
20 22 bench/pbrt-v4/optimized/shapes.ll
12 15 bench/php/optimized/compat.ll
12 15 bench/php/optimized/php_cli_server.ll
12 15 bench/php/optimized/php_ini.ll
20 21 bench/pocketpy/optimized/compiler.ll
12 15 bench/postgres/optimized/createplan.ll
4 5 bench/postgres/optimized/pg_ctl.ll
11 13 bench/postgres/optimized/varbit.ll
22 23 bench/postgres/optimized/varchar.ll
13 15 bench/proj/optimized/grids.ll
14 13 bench/proj/optimized/test_c_api.ll
9 6 bench/protobuf/optimized/writer.ll
2 4 bench/quantlib/optimized/discretizeddoublebarrieroption.ll
1 2 bench/quickjs/optimized/quickjs-libc.ll
12 11 bench/rocksdb/optimized/pessimistic_transaction.ll
32 31 bench/ruby/optimized/generator.ll
1 2 bench/ruby/optimized/shape.ll
16 17 bench/rust-analyzer-rs/optimized/34epm85550lugb2d.ll
10 13 bench/slurm/optimized/node_conf.ll
31 30 bench/spike/optimized/htif.ll
30 31 bench/sundials/optimized/cvDiurnal_kry_bp.ll
42 44 bench/tokenizers-rs/optimized/1ve5rid4048y19bt.ll
6 12 bench/vcpkg/optimized/commands.download.ll
6 5 bench/velox/optimized/AsyncDataCache.ll
13 19 bench/velox/optimized/Expr.ll
11 10 bench/verilator/optimized/V3Broken.ll
5 4 bench/verilator/optimized/V3SchedAcyclic.ll
15 18 bench/verilator/optimized/V3Undriven.ll
4 5 bench/wireshark/optimized/packet-cimd.ll
30 26 bench/wireshark/optimized/packet-e2ap.ll
6 7 bench/wolfssl/optimized/wc_port.ll
4 5 bench/xgboost/optimized/json.ll
19 24 bench/xgboost/optimized/stats.ll
6 9 bench/yalantinglibs/optimized/addressbook.struct_pb.ll
10 15 bench/yosys/optimized/fstdata.ll
11 16 bench/yosys/optimized/trace.ll
22 21 bench/z3/optimized/api_log.ll
15 17 bench/z3/optimized/upolynomial_factorization.ll
17 16 bench/z3/optimized/util.ll
26 30 bench/zed-rs/optimized/2tseelemdefm2fo39q21ogou2.ll
33 37 bench/zed-rs/optimized/7r4ka3qnhzi2ha4uh17j4gbwu.ll
19 27 bench/zed-rs/optimized/a48ncfl2mo4yu8srnhcxrs0e7.ll
34 38 bench/zed-rs/optimized/eaprtangkb3lmpqytawf4lguo.ll

Copy link
Contributor

Here's a high-level summary of the major changes observed in the LLVM IR diffs:

  1. GEP (GetElementPtr) Simplifications:

    • Many instances show conversion from getelementptr to inbounds or removal of unnecessary GEP calculations. For example, replacing %gep = getelementptr i8, ptr %base, i64 %offset with %gep = getelementptr inbounds i8, ptr %base, i64 %offset. This ensures stricter bounds checking and improves safety.
  2. Phi Node Adjustments:

    • Several phi nodes have been updated to reflect new predecessors or values. For instance, %phi_var = phi type [value, predecessor] is adjusted to include correct block labels or values, ensuring proper loop unrolling and control flow handling.
  3. Loop Reorganization:

    • Loops are restructured for better performance. Some loops now use different exit conditions or phi nodes, such as changing %exitcond = icmp eq i64 %indvars.iv.next, %trip_count to more efficient forms or removing redundant preheader blocks.
  4. Memory Access Optimization:

    • Memory accesses are streamlined by adjusting offsets and alignment. For example, %load_val = load type, ptr %gep is replaced with more precise GEPs like %gep = getelementptr i8, ptr %base, i64 %offset, reducing potential aliasing issues.
  5. Function Call Adjustments:

    • Function calls are modified to use correct arguments or return types. For example, replacing call void @function(ptr %arg) with call void @function(ptr %adjusted_arg) ensures proper pointer arithmetic and alignment.

These changes collectively aim to improve code safety, reduce redundancy, enhance memory access patterns, and optimize control flow structures within the LLVM IR. The transformations likely result from improvements in LLVM's optimization passes, such as GVN (Global Value Numbering), LICM (Loop Invariant Code Motion), or SROA (Scalar Replacement of Aggregates).

model: qwen-plus-latest
CompletionUsage(completion_tokens=428, prompt_tokens=107504, total_tokens=107932, completion_tokens_details=None, prompt_tokens_details=None)

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