Skip to content

pre-commit: PR131869 #2217

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
Open

pre-commit: PR131869 #2217

wants to merge 3 commits into from

Conversation

dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Mar 19, 2025

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

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

dtcxzyw commented Mar 19, 2025

Diff mode

runner: ariselab-64c-v2
baseline: llvm/llvm-project@5728813
patch: llvm/llvm-project#131869
sha256: 2cfcec1fe8890efcda19619c1680a1951982628a0df3151592c5dad056a311a4
commit: 8fddd72

20 files changed, 6817 insertions(+), 6884 deletions(-)

Improvements:
  memdep.NumCacheDirtyNonLocalPtr 22536 -> 22539 +0.01%
  licm.NumPromotionCandidates 460104 -> 460112 +0.00%
  dse.NumGetDomMemoryDefPassed 1150934 -> 1150952 +0.00%
  dse.NumFastOther 138646 -> 138648 +0.00%
  sccp.NumDeadBlocks 631632 -> 631641 +0.00%
  gvn.NumGVNLoad 1222867 -> 1222884 +0.00%
  sccp.NumInstRemoved 1835117 -> 1835138 +0.00%
  licm.NumMovedLoads 503866 -> 503871 +0.00%
  dse.NumFastStores 949756 -> 949764 +0.00%
  argpromotion.NumArgumentsPromoted 567468 -> 567472 +0.00%
Regressions:
  gvn.IsValueFullyAvailableInBlockNumSpeculationsMax 524883 -> 524834 -0.01%
  gvn.NumPRELoadMoved2CEPred 78681 -> 78680 -0.00%
  memdep.NumCacheNonLocalPtr 224859852 -> 224858890 -0.00%
  simplifycfg.NumSinkCommonCode 308089 -> 308088 -0.00%
  simplifycfg.NumSinkCommonInstrs 654335 -> 654334 -0.00%
  memdep.NumCacheCompleteNonLocalPtr 4800118 -> 4800113 -0.00%
  memcpyopt.NumMemCpyInstr 1141699 -> 1141698 -0.00%
  instcombine.NegatorTotalNegationsAttempted 19278072 -> 19278059 -0.00%
  instcombine.NegatorNumValuesVisited 20037899 -> 20037886 -0.00%
  scalar-evolution.NumExitCountsNotComputed 10898425 -> 10898421 -0.00%

39 43 bench/c3c/optimized/sema_expr.ll
23 25 bench/libjpeg-turbo/optimized/tjbench.ll
2 3 bench/linux/optimized/indirect.ll
3 5 bench/llvm/optimized/GVNSink.ll
2 2 bench/llvm/optimized/LowerTypeTests.ll
26 28 bench/llvm/optimized/SelectionDAG.ll
1 1 bench/oiio/optimized/xmp.ll
33 31 bench/openspiel/optimized/solitaire.ll
21 19 bench/openssl/optimized/ctrl_params_translate.ll
117 125 bench/php/optimized/zend_inheritance.ll
169 161 bench/raylib/optimized/rmodels.ll
0 1 bench/rust-analyzer-rs/optimized/7lpeywhc9n6h2ze.ll
1 5 bench/wireshark/optimized/packet-quic.ll
76 92 bench/z3/optimized/mbp_term_graph.ll

Copy link
Contributor

Summary of Major Changes in LLVM IR Patches

  1. Store Operations Removed:

    • In multiple files (sema_expr.ll, 7lpeywhc9n6h2ze.ll), store instructions have been removed, such as store i32 %67, ptr %4, align 4. This suggests optimizations where intermediate values are no longer stored to memory but instead kept in registers or eliminated entirely.
  2. Phi Node Adjustments:

    • In several files (SelectionDAG.ll, zend_inheritance.ll), phi nodes have been adjusted to handle different predecessors and operands more efficiently. For example, in SelectionDAG.ll, the phi node %670 = phi ptr [ %.pre869, %623 ], [ %53, %624 ], [ %53, %613 ] consolidates values from multiple predecessors into a single variable.
  3. Branching Logic Simplified:

    • Branching logic has been simplified in various places. For instance, in openspiel/optimized/solitaire.ll, the switch statement replaces multiple conditional branches, reducing complexity. Similarly, in wireshark/optimized/packet-quic.ll, redundant branching logic is removed by merging blocks like quic_create_decoders.exit.thread.sink.split.i.
  4. Memory Access Optimizations:

    • Memory access patterns have been optimized. For example, in libjpeg-turbo/optimized/tjbench.ll, the instruction %664 = shl nuw nsw i64 %663, 3 replaces two separate load and shift operations, indicating improved memory handling and reduced overhead.
  5. Function Calls Streamlined:

    • Function calls have been streamlined to use fewer arguments or eliminate unnecessary loads before calls. For example, in raylib/optimized/rmodels.ll, the call call fastcc void @register_unresolved_classes(ptr noundef %0, ptr %1, i32 %5) is simplified by removing redundant loads and directly using register values.

These changes collectively aim to reduce memory usage, streamline control flow, and optimize function calls, leading to more efficient code generation. The removal of redundant stores, adjustments to phi nodes, simplification of branching logic, optimization of memory access patterns, and streamlining of function calls all contribute to better performance and reduced resource consumption.

model: qwen-plus-latest
CompletionUsage(completion_tokens=500, prompt_tokens=44662, total_tokens=45162, 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.

1 participant