Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

@zyw-bot zyw-bot commented Oct 22, 2025

@github-actions github-actions bot mentioned this pull request Oct 22, 2025
@zyw-bot
Copy link
Collaborator Author

zyw-bot commented Oct 22, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@37fcaf5
patch: llvm/llvm-project@main...fhahn:llvm-project:ce-reorder-add
sha256: 94c8ebf81730a69a527ef4074107d96d398e3c058288771f6b5cac49f49df3d6
commit: 5994f8c

121 files changed, 192274 insertions(+), 194270 deletions(-)

Improvements:
  loop-simplifycfg.NumLoopExitsDeleted 4072 -> 4214 +3.49%
  loop-simplifycfg.NumTerminatorsFolded 10625 -> 10806 +1.70%
  dse.NumCFGChecks 638995 -> 639536 +0.08%
  dse.NumCFGTries 55345 -> 55375 +0.05%
  instcombine.NumConstProp 156904 -> 156974 +0.04%
  loop-simplifycfg.NumLoopBlocksDeleted 6851 -> 6854 +0.04%
  memdep.NumCacheDirtyNonLocalPtr 23069 -> 23075 +0.03%
  dse.NumCFGSuccess 8542 -> 8544 +0.02%
  memcpyopt.NumCpyToSet 10942 -> 10944 +0.02%
  constraint-elimination.NumCondsRemoved 3348922 -> 3349354 +0.01%
Regressions:
  loop-idiom.NumMemCpy 9011 -> 8936 -0.83%
  memcpyopt.NumStackMove 80854 -> 80790 -0.08%
  indvars.NumElimCmp 55115 -> 55073 -0.08%
  gvn.NumGVNBlocks 191157 -> 191029 -0.07%
  loop-delete.NumDeleted 112395 -> 112321 -0.07%
  loop-delete.NumBackedgesBroken 43449 -> 43422 -0.06%
  instsimplify.NumReassoc 800650 -> 800499 -0.02%
  indvars.NumReplaced 69067 -> 69056 -0.02%
  scalar-evolution.NumExitCountsComputed 4047936 -> 4047635 -0.01%
  gvn.NumGVNSimpl 4422595 -> 4422349 -0.01%

+6 llvm/YAMLParser.ll
+1 fish-rs/2jegnuo3b7uy1oojff5kt8alk.ll
+0 assimp/FBXBinaryTokenizer.ll
+0 cmake/cmTarget.ll
+0 cmake/cmakemain.ll
+0 coreutils-rs/2g9ijtjos2xwh9zs.ll
+0 duckdb/format.ll
+0 duckdb/ub_duckdb_common.ll
+0 duckdb/ub_duckdb_core_functions_string.ll
+0 opencv/eltwise_layer.ll
+0 opencv/freak.ll
+0 pola-rs/9kt0ps7am1ervf5eo1u53zq54.ll
+0 ruff-rs/4a0sesc153a050u04do7llz00.ll
+0 rust-analyzer-rs/4hdqg9y9agw1ekve.ll
+0 tree-sitter-rs/55e7aotywrgrb7st.ll
-1 abc/giaMf.ll
-2 llvm/IfConversion.ll
-2 rocksdb/experimental.ll
-2 wireshark/packet-isis-lsp.ll
-3 hermes/APInt.ll
-4 abc/ifDec16.ll
-4 openssl/v3_ncons.ll
-4 wireshark/sharkd_session.ll
-5 image-rs/5ez7udly19o3uj1p.ll
-5 llvm/APInt.ll
-5 wireshark/packet-hartip.ll
-7 llvm/Attributes.ll
-9 abc/giaSatEdge.ll
-9 elfshaker-rs/efmso49nxcvtljggmhiyzv2jj.ll
-9 quantlib/garch.ll
-9 quinn-rs/em94uyxz0wp9gccfab963606p.ll
-9 ruff-rs/272al911l1jdbqblbb9whzfue.ll
-9 uv-rs/6909c4r4kqhl58g4t63amtvkr.ll
-9 wasmi-rs/apu427tbl3luqie4ryqrtwt7n.ll
-9 wasmtime-rs/5079e95b7v1wxko.ll
-11 quantlib/capletcoterminalmaxhomogeneity.ll
-11 rust-analyzer-rs/4mz36mxu8r0g7zqk.ll
-11 uv-rs/cd91bxdrbjyy0s7hgoreg00sd.ll
-11 wasmtime-rs/3wy7qx4e8fg0rwt0.ll
-12 llvm/X86TargetTransformInfo.ll
-12 opencv/model.ll
-13 quantlib/multiproductmultistep.ll
-13 ruff-rs/5k764i8zv3uxwobi5mx2hjj5g.ll
-14 gromacs/splineutil.ll
-25 ruff-rs/6gcc2sei0t3mzzmp63ppi5tol.ll
-27 open3d/TriangleMeshDeformation.ll
-30 libigl/min_quad_with_fixed.2.ll
-30 meshlab/cube_style_precomputation.ll
-33 meshlab/arap.ll

@github-actions
Copy link
Contributor

The provided diff contains numerous changes across multiple LLVM IR files, primarily involving optimizations and simplifications. Here are the major changes summarized:

  1. Simplification of Pointer Arithmetic and Memory Operations:

    • Several instances of pointer arithmetic and memory operations have been optimized. For example, in giaMf.ll, the use of getelementptr and load instructions has been streamlined to reduce redundant calculations and improve clarity.
    • In giaSatEdge.ll, the allocation and initialization of structures have been simplified, reducing the number of intermediate steps and improving performance.
  2. Optimization of Loop Structures:

    • Loops in various functions have been optimized to reduce the number of iterations and improve branch prediction. For instance, in ifDec16.ll, the loop structure has been reorganized to minimize the number of conditional checks and improve data flow.
    • In FBXBinaryTokenizer.ll, the loop for reading binary data has been optimized to reduce the overhead of function calls and improve cache locality.
  3. Reduction of Redundant Instructions:

    • Redundant instructions, such as unnecessary phi nodes and redundant load/store operations, have been eliminated. This is evident in cmTarget.ll where redundant phi nodes have been removed, leading to a more efficient control flow.
    • In cmakemain.ll, redundant phi nodes and load/store operations have been optimized to reduce the overall instruction count and improve performance.
  4. Improvement of Exception Handling:

    • Exception handling paths have been simplified to reduce the overhead of exception propagation. In coreutils-rs.ll, the exception handling path has been streamlined to reduce the number of landing pad instructions and improve the efficiency of error handling.
  5. Enhancement of Function Calls and Returns:

    • Function calls and returns have been optimized to reduce the overhead of parameter passing and return value handling. In duckdb.ll, function calls have been optimized to reduce the number of intermediate variables and improve the efficiency of data transfer.

These changes collectively aim to improve the performance and efficiency of the generated code by reducing redundancy, optimizing loops, and streamlining memory and control flow operations.

model: qwen-plus-latest
CompletionUsage(completion_tokens=459, prompt_tokens=111623, total_tokens=112082, completion_tokens_details=None, prompt_tokens_details=None)

fhahn added a commit to fhahn/llvm-project that referenced this pull request Oct 23, 2025
We have dedicated decomposition logic for (add %x, -C), but if we have
(add nsw %x, -C)  we will first apply the generic logic for NSWAdd,
which gives worse results for negative constants in practice.

Update the code to first apply the pattern with negative constants.

Helps to remove a number of runtime checks in practice:
dtcxzyw/llvm-opt-benchmark#2968

Alive2 proofs for the test changes: https://alive2.llvm.org/ce/z/JfR2Ma
fhahn added a commit to llvm/llvm-project that referenced this pull request Oct 23, 2025
…64791)

We have dedicated decomposition logic for (add %x, -C), but if we have
(add nsw %x, -C) we will first apply the generic logic for NSWAdd, which
gives worse results for negative constants in practice.

Update the code to first apply the pattern with negative constants.

Helps to remove a number of runtime checks in practice:
dtcxzyw/llvm-opt-benchmark#2968

Alive2 proofs for the test changes: https://alive2.llvm.org/ce/z/JfR2Ma

PR: #164791
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 23, 2025
…decomp. (#164791)

We have dedicated decomposition logic for (add %x, -C), but if we have
(add nsw %x, -C) we will first apply the generic logic for NSWAdd, which
gives worse results for negative constants in practice.

Update the code to first apply the pattern with negative constants.

Helps to remove a number of runtime checks in practice:
dtcxzyw/llvm-opt-benchmark#2968

Alive2 proofs for the test changes: https://alive2.llvm.org/ce/z/JfR2Ma

PR: llvm/llvm-project#164791
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
…vm#164791)

We have dedicated decomposition logic for (add %x, -C), but if we have
(add nsw %x, -C) we will first apply the generic logic for NSWAdd, which
gives worse results for negative constants in practice.

Update the code to first apply the pattern with negative constants.

Helps to remove a number of runtime checks in practice:
dtcxzyw/llvm-opt-benchmark#2968

Alive2 proofs for the test changes: https://alive2.llvm.org/ce/z/JfR2Ma

PR: llvm#164791
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…vm#164791)

We have dedicated decomposition logic for (add %x, -C), but if we have
(add nsw %x, -C) we will first apply the generic logic for NSWAdd, which
gives worse results for negative constants in practice.

Update the code to first apply the pattern with negative constants.

Helps to remove a number of runtime checks in practice:
dtcxzyw/llvm-opt-benchmark#2968

Alive2 proofs for the test changes: https://alive2.llvm.org/ce/z/JfR2Ma

PR: llvm#164791
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…vm#164791)

We have dedicated decomposition logic for (add %x, -C), but if we have
(add nsw %x, -C) we will first apply the generic logic for NSWAdd, which
gives worse results for negative constants in practice.

Update the code to first apply the pattern with negative constants.

Helps to remove a number of runtime checks in practice:
dtcxzyw/llvm-opt-benchmark#2968

Alive2 proofs for the test changes: https://alive2.llvm.org/ce/z/JfR2Ma

PR: llvm#164791
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