Skip to content
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

pre-commit: PRnikic/llvm-project/commit/37f1d405e40d9a12c0de48acd3bcb15a01d88f25 #2135

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

Conversation

dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Feb 18, 2025

Link: nikic/llvm-project@37f1d40
Requested by: @nikic

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

dtcxzyw commented Feb 18, 2025

runner: ariselab-64c-v2
baseline: llvm/llvm-project@378c6fb
patch: nikic/llvm-project@37f1d40
sha256: 4b66c3f14d4f7fba120a7c373bfed91eeca8ecc99a94b0db9bf3823606d48070
commit: 7a079f1

1227 files changed, 3073032 insertions(+), 3112161 deletions(-)

Improvements:
  adce.NumBranchesRemoved 21738 -> 23050 +6.04%
  licm.NumMovedCalls 26178 -> 26452 +1.05%
  licm.NumPromotionCandidates 444917 -> 448013 +0.70%
  instcombine.NumDeadStore 24309 -> 24455 +0.60%
  memcpyopt.NumCallSlot 593752 -> 596393 +0.44%
  adce.NumRemoved 91438 -> 91836 +0.44%
  jump-threading.NumDupes 110487 -> 110910 +0.38%
  licm.NumLoadStorePromoted 60104 -> 60242 +0.23%
  instsimplify.NumReassoc 333057 -> 333475 +0.13%
  gvn.IsValueFullyAvailableInBlockNumSpeculationsMax 493431 -> 493851 +0.09%
Regressions:
  memcpyopt.NumStackMove 58762 -> 56702 -3.51%
  simplifycfg.NumSpeculations 353326 -> 351197 -0.60%
  correlated-value-propagation.NumCmps 253648 -> 252169 -0.58%
  indvars.NumFoldedUser 2011 -> 2001 -0.50%
  correlated-value-propagation.NumSICmps 48127 -> 47954 -0.36%
  correlated-value-propagation.NumAddNSW 225205 -> 224433 -0.34%
  correlated-value-propagation.NumSelects 221494 -> 221074 -0.19%
  correlated-value-propagation.NumAddNW 421257 -> 420493 -0.18%
  correlated-value-propagation.NumNSW 458691 -> 457869 -0.18%
  lower-is-constant-intrinsic.ObjectSizeIntrinsicsHandled 4703 -> 4696 -0.15%

1 1 bench/abc/optimized/giaUtil.ll
0 3 bench/abseil-cpp/optimized/node_hash_map_test.ll
55 45 bench/actix-rs/optimized/2wg1z1eatrkafji9.ll
14 21 bench/actix-rs/optimized/34v80y29y6uwgxas.ll
2 2 bench/arrow/optimized/array_dict.ll
52 64 bench/boost/optimized/async.ll
5 3 bench/clap-rs/optimized/421wxj3t0b5xgmkw.ll
14 15 bench/coreutils-rs/optimized/1kb5om7319h53b1f.ll
0 2 bench/coreutils-rs/optimized/1rno21l8yxg9vs0k.ll
3 4 bench/coreutils-rs/optimized/2cnndbx112sveeb9.ll
15 16 bench/coreutils-rs/optimized/4kgrj997pbefuahr.ll
0 6 bench/coreutils-rs/optimized/if1nymhyh0puht7.ll
0 2 bench/darktable/optimized/CiffParser.ll
13 12 bench/darktable/optimized/FileReader.ll
3 5 bench/darktable/optimized/FileWriter.ll
57 58 bench/darktable/optimized/LJpegDecoder.ll
45 46 bench/darktable/optimized/NakedDecoder.ll
0 2 bench/delta-rs/optimized/43rqrp2cinp33t64.ll
20 19 bench/delta-rs/optimized/4jpyf52a2nk6q4dy.ll
22 29 bench/delta-rs/optimized/5gq5labm4y40zyg0.ll
5 21 bench/diesel-rs/optimized/15s0i984drbne3lh.ll
25 24 bench/diesel-rs/optimized/re13hpgqfsvf2ck.ll
10 4 bench/hermes/optimized/Path.ll
3 1 bench/hermes/optimized/interp-dispatch-bench.ll
5 18 bench/html5ever-rs/optimized/2ju3n2qmt0ooyuv4.ll
5 18 bench/html5ever-rs/optimized/3n74qlghvzguzx1d.ll
24 20 bench/html5ever-rs/optimized/6qwbbyxelav3qgo.ll
10 23 bench/html5ever-rs/optimized/dg2cb04337sswh6.ll
16 23 bench/image-rs/optimized/1clnprdgqfw2q9lq.ll
27 19 bench/image-rs/optimized/5oy2v8fghrh79s8.ll
22 18 bench/influxdb-rs/optimized/2du585cd6kvsz0m5.ll
26 31 bench/influxdb-rs/optimized/54bldmpi534adbqh.ll
2 0 bench/llvm/optimized/CombinerHelper.ll
8 10 bench/meilisearch-rs/optimized/4nfen0oz6o4cyiq8.ll
0 3 bench/meilisearch-rs/optimized/4rtt9oltj0ubuf08.ll
2 7 bench/meilisearch-rs/optimized/5788mfqwwp628q0b.ll
5 5 bench/meshlab/optimized/filter_mesh_alpha_wrap.ll
0 2 bench/mini-lsm-rs/optimized/1mavrvqu7b39yar1.ll
28 30 bench/mini-lsm-rs/optimized/4c6shhrwpfde8fun.ll
14 5 bench/mini-lsm-rs/optimized/xb52qaqr7dfb8ti.ll
92 90 bench/mitsuba3/optimized/codeholder.ll
10 8 bench/ockam-rs/optimized/189wgg1obirl4k4t.ll
2 8 bench/ockam-rs/optimized/1j8f46ag92qmaepd.ll
2 5 bench/ockam-rs/optimized/4ie0aygpnuk5bzdx.ll
25 24 bench/openmpi/optimized/state_dvm.ll
19 18 bench/openmpi/optimized/state_prted.ll
23 56 bench/php/optimized/info.ll
60 70 bench/php/optimized/password.ll
15 18 bench/php/optimized/phar.ll
43 46 bench/qdrant-rs/optimized/2v88rld7ajfr8cux.ll
13 20 bench/rand-rs/optimized/2wmck7c19vohagqu.ll
14 10 bench/rayon-rs/optimized/1ospp3uz7h49thev.ll
2 0 bench/rayon-rs/optimized/2xi93mrj8f00xnic.ll
13 9 bench/rayon-rs/optimized/4k8zt5cv4x2jivhi.ll
26 19 bench/rayon-rs/optimized/aeba4nd7ialzggy.ll
6 4 bench/redis/optimized/arena.ll
13 13 bench/regex-rs/optimized/1pxsmct4oxs5dlep.ll
17 15 bench/ripgrep-rs/optimized/1iopc15nf6qmod4f.ll
27 19 bench/ripgrep-rs/optimized/1zzjpab9m5homdm3.ll
0 4 bench/ripgrep-rs/optimized/f8chif48dhkcb7u.ll
21 17 bench/ripgrep-rs/optimized/kiwlvuwlry6renb.ll
2 0 bench/ripgrep-rs/optimized/n2o0pbfhrfss8aa.ll
26 20 bench/rocksdb/optimized/xxhash.ll
3 4 bench/rust-analyzer-rs/optimized/25mimo7c8tgr4lg9.ll
1 7 bench/rust-analyzer-rs/optimized/a1gz87jxvbvnc32.ll
25 24 bench/serde-rs-json/optimized/19be4mv19oulzif3.ll
26 22 bench/serde-rs-json/optimized/mlftjs9t2bz2jrv.ll
13 17 bench/smol-rs/optimized/42mrm3r913zsut0b.ll
28 22 bench/stat-rs/optimized/2ao4u4y4ndqxwz8u.ll
3 6 bench/stb/optimized/stb_image_resize2.ll
48 49 bench/tls-rs/optimized/1edtspt3qu76t3sp.ll
0 4 bench/tls-rs/optimized/4vg8hiu39ndz9uqe.ll
20 36 bench/tls-rs/optimized/59h61akxu6z29dlt.ll
26 18 bench/tokenizers-rs/optimized/3yaq830kuxi6xpg5.ll
0 4 bench/tokenizers-rs/optimized/4hn9gefsll13qr1r.ll
21 17 bench/tokenizers-rs/optimized/5e69nv5s2wu1vtyr.ll
0 6 bench/tokio-rs/optimized/27wc5j4mui8auwxp.ll
41 44 bench/tokio-rs/optimized/3nmgzybx6iv04snk.ll
6 14 bench/tokio-rs/optimized/um69cc05lgsv45r.ll
0 10 bench/tree-sitter-rs/optimized/1cv8rmziqotlzxv3.ll
21 63 bench/typst-rs/optimized/26ex1w19ixz6ifuk.ll
67 55 bench/typst-rs/optimized/3efk6odw6ecl29p.ll
21 15 bench/typst-rs/optimized/4p30esqzpn2o5olu.ll
8 15 bench/wasmedge/optimized/vm.ll
28 20 bench/wasmtime-rs/optimized/1kan0u7yfu7u6hal.ll
8 4 bench/wasmtime-rs/optimized/399kmbdnjp4ndw8c.ll
4 2 bench/wasmtime-rs/optimized/5bnmgwn9lrqkuyf1.ll
21 15 bench/wasmtime-rs/optimized/qzwdmrmrn8c2iza.ll
14 5 bench/z3/optimized/array_internalize.ll
2 7 bench/zed-rs/optimized/0l389uso3hcz3jykn1uvcmawm.ll

Copy link
Contributor

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

  1. Integer Conversion and Assumptions:

    • Several instances of zext (zero-extension) have been replaced with sext (sign-extension) for integer type conversions, particularly from i32 to i64. This change ensures that signed values are properly extended when necessary.
    • Additional icmp instructions and llvm.assume calls have been introduced to validate assumptions about pointer non-nullity or integer bounds. For example, checks like icmp ne i64 %x, 0 followed by llvm.assume(i1 %result) ensure that certain conditions hold true at runtime.
  2. Memory Access and Alignment:

    • Adjustments to memory access patterns, such as changing offsets in getelementptr instructions. For instance, some offsets were reduced (e.g., from 96 to 88) or reordered to improve alignment and efficiency.
    • Removal of unnecessary nonnull metadata in load/store instructions where it was redundant or not strictly required.
  3. Lifetime Management:

    • Reorganization of llvm.lifetime.start and llvm.lifetime.end calls to better reflect object lifetimes. In some cases, these calls were moved or removed entirely if they were deemed unnecessary after optimization.
    • Allocations and deallocations (alloca and __rust_dealloc) were adjusted to align with new memory usage patterns, including changes in size and alignment.
  4. Function Attributes:

    • Updates to function attributes to refine memory behavior specifications. For example:
      • Changed memory(argmem: readwrite) to memory(argmem: readwrite, inaccessiblemem: write) to indicate that functions may write to memory regions not directly accessed via arguments.
      • Removed or updated attributes like mustprogress, willreturn, and inaccessiblemem to better describe function behavior and enable further optimizations.
  5. Control Flow Simplification:

    • Simplified control flow by removing redundant branches or combining basic blocks. For instance, replacing multiple br instructions with fewer, more concise ones.
    • Introduction of icmp ult (unsigned less-than) checks in loops to enforce bounds on indices, improving safety and enabling compiler optimizations.

These changes collectively aim to enhance performance, reduce redundancy, and improve code safety by refining memory access patterns, enforcing stricter assumptions, and simplifying control flow. The updates also reflect improvements in how the compiler tracks object lifetimes and memory usage, ensuring better optimization opportunities while maintaining correctness.

model: qwen-plus-latest
CompletionUsage(completion_tokens=531, prompt_tokens=110119, total_tokens=110650, 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