Skip to content

Conversation

@zyw-bot
Copy link
Collaborator

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

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

zyw-bot commented Jul 22, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@8c14d3f
patch: llvm/llvm-project#149858
sha256: b23203c3f725f9581b3164baff1573bf67128491f0bc6ea9efaf93963025d391
commit: 19ddc16

7 files changed, 1104 insertions(+), 1125 deletions(-)

Improvements:
  licm.NumMovedCalls 35331 -> 35337 +0.02%
  indvars.NumReplaced 72991 -> 72994 +0.00%
  licm.NumSunk 281268 -> 281274 +0.00%
  loop-delete.NumDeleted 119601 -> 119603 +0.00%
  gvn.NumGVNBlocks 200170 -> 200173 +0.00%
  jump-threading.NumFolds 2761966 -> 2761967 +0.00%
  last-run-tracking.NumSkippedPasses 51935269 -> 51935271 +0.00%
Regressions:
  instsimplify.NumSimplified 2617815 -> 2617803 -0.00%
  lcssa.NumLCSSA 16110838 -> 16110777 -0.00%
  indvars.NumLFTR 337238 -> 337237 -0.00%
  gvn.NumGVNSimpl 4745528 -> 4745515 -0.00%
  simplifycfg.NumHoistCommonCode 856582 -> 856580 -0.00%
  simplifycfg.NumHoistCommonInstrs 2476030 -> 2476028 -0.00%
  correlated-value-propagation.NumPhis 1343662 -> 1343661 -0.00%
  loop-vectorize.LoopsAnalyzed 2062880 -> 2062879 -0.00%
  instcombine.NegatorNumValuesVisited 22991100 -> 22991092 -0.00%
  instcombine.NumCombined 130208676 -> 130208636 -0.00%

12 17 bench/abc/optimized/extraUtilMisc.ll
34 40 bench/minetest/optimized/test_map.ll
40 36 bench/mitsuba3/optimized/x86rapass.ll
2 3 bench/postgres/optimized/inherit.ll
17 18 bench/rocksdb/optimized/db_impl_compaction_flush.ll

@github-actions
Copy link
Contributor

Here are the major changes in the patch:

  1. Loop Structure Simplification in Extra_TruthCanonN:
    The function reorganizes its loop structure by moving the shl instruction earlier and eliminating redundant basic blocks (Extra_TruthPolarize.exit is merged into the exit path). This reduces control flow complexity and removes an unnecessary loop latch.

  2. Phi Node Value Reordering in Minetest Loop:
    In several loops (e.g., for.cond16.preheader.i.preheader, for.body22.i.preheader), the order of incoming values in phi nodes is adjusted to reflect updated control flow. This ensures correct dominance without changing logic—likely a result of loop transformation or simplification.

  3. Reduction in Redundant Min/Max Operations in Minetest:
    Previously, min/max operations (e.g., @llvm.smin.i16, @llvm.smax.i16) were computed in one block but used much later. Now, they are computed closer to use (e.g., in for.cond190.for.inc208_crit_edge.i), reducing live ranges and improving register allocation.

  4. Loop Phi Node and Control Flow Cleanup in x86RAPass:
    The loop in _ZN6asmjit9_abi_1_103x869X86RAPass8_rewriteEPNS0_8Bas is simplified: phi nodes and min/max logic are restructured to eliminate unnecessary .loopexit blocks, making the loop more canonical and easier for LLVM to optimize further.

  5. Elimination of Redundant Phi Values in Postgres and RocksDB:
    In both inherit.ll and db_impl_compaction_flush.ll, unused or redundant phi values are removed (e.g., %.896199216 in Postgres, speculative values in RocksDB), and min/max operations are moved closer to their use points, improving code clarity and reducing register pressure.

These changes collectively simplify control flow, reduce redundant computations, and improve data flow locality—typical outcomes of loop and CFG optimization passes in LLVM.

model: qwen-plus-latest
CompletionUsage(completion_tokens=452, prompt_tokens=13613, total_tokens=14065, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants