Skip to content

Conversation

@dtcxzyw
Copy link
Owner

@dtcxzyw dtcxzyw commented Jun 6, 2025

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

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

dtcxzyw commented Jun 6, 2025

Diff mode

runner: ariselab-64c-docker
baseline: llvm/llvm-project@7809b14
patch: llvm/llvm-project#143144
sha256: f0f1ff521811e2a71a89a168ffb2b2d297286d55169381c649e678fa26a5a90b
commit: 77bdf81

10 files changed, 41341 insertions(+), 41469 deletions(-)

Improvements:
  early-cse.NumCSECall 29694 -> 29695 +0.00%
  correlated-value-propagation.NumAddNSW 280768 -> 280770 +0.00%
  gvn.NumGVNInstr 160543 -> 160544 +0.00%
  gvn.NumGVNPRE 160543 -> 160544 +0.00%
  correlated-value-propagation.NumAddNW 521830 -> 521832 +0.00%
  correlated-value-propagation.NumNSW 654439 -> 654441 +0.00%
  simplifycfg.NumFoldBranchToCommonDest 792694 -> 792696 +0.00%
  correlated-value-propagation.NumNW 1075952 -> 1075954 +0.00%
  instcombine.NumDeadInst 45379011 -> 45379051 +0.00%
  jump-threading.NumFolds 2763117 -> 2763119 +0.00%
Regressions:
  deadargelim.NumArgumentsReplacedWithPoison 105932 -> 105927 -0.00%
  correlated-value-propagation.NumSelects 247077 -> 247074 -0.00%
  gvn.NumGVNLoad 1444669 -> 1444664 -0.00%
  instcombine.NumSunkInst 3554177 -> 3554171 -0.00%
  memdep.NumUncacheNonLocalPtr 269951695 -> 269951509 -0.00%
  early-cse.NumCSEGEP 14081262 -> 14081254 -0.00%
  memdep.NumCacheNonLocalPtr 279999214 -> 279999063 -0.00%
  early-cse.NumCSELoad 7690701 -> 7690698 -0.00%
  inline-cost.NumCallsAnalyzed 53871430 -> 53871427 -0.00%
  inline.NumInlined 44574641 -> 44574639 -0.00%

29 29 bench/typst-rs/optimized/3rk2ctuzbghb17s4.ll
16 16 bench/typst-rs/optimized/49m3cs7hus53ztof.ll
34 40 bench/typst-rs/optimized/4m3ebbqd1xx21e5m.ll
45 45 bench/typst-rs/optimized/4qskctz4kwc33g7b.ll

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2025

Here is a high-level summary of the most significant changes in this LLVM IR diff:

  1. PHI Node Adjustments in Control Flow
    Multiple phi instructions were updated to reflect changes in predecessor blocks, particularly in the function _ZN5typst4math8equation19add_equation_number17h0e3cb18c986ea4E. These updates suggest that control flow has changed, with new basic blocks introduced or renamed (e.g., %62 → %63, %85 → %89). This indicates refactoring or optimization of branching logic.

  2. Floating Point Arithmetic Simplifications
    Several sequences involving fcmp ord followed by select have been restructured to reduce redundant operations. For example:

    %48 = fmul double %47, 5.000000e-01
    %49 = select i1 %.0.i.inv.i.i.i1.i, double %48, double 0.000000e+00

    replaces:

    %.0.i.i.i2.i = select i1 ..., double %47, 0.0...
    %48 = fmul ...

    These changes simplify the use of floating-point values after validity checks, likely improving clarity and potentially enabling better codegen.

  3. Reduction of Intermediate Selects and Fadds
    In several places, chains of select and fadd instructions were simplified by reordering or eliminating intermediate steps. For instance:

    %102 = fmul double %99, 5.000000e-01
    %103 = select i1 ..., double %102, 0.0...

    was introduced in place of:

    %.0.i.i.i2.i = select ..., double %99, 0.0...
    %100 = fmul ...

    This reduces unnecessary intermediate variables and simplifies data flow.

  4. Improved Branch Target Consistency
    Switch and branch targets were adjusted to reference updated labels (e.g., %78 → %80, %87 → %89). These changes align with updated control flow structure and may improve CFG (Control Flow Graph) analysis and optimization opportunities.

  5. Cleanup of Unused or Redundant Instructions
    Some unused intermediate values and redundant selects were removed entirely, especially in the function _ZN5typst6layout3pad4grow17hc4f8ba70e3595b78E. For example:

    %.0.i.i.i.i.i = select i1 ..., double %11, 0.0...

    was removed and replaced directly with uses of %11 where appropriate. This improves readability and may allow for better register allocation or vectorization downstream.


Summary

The patch primarily reflects local optimizations and cleanups in floating-point arithmetic, PHI node adjustments due to altered control flow, and removal of redundant intermediate operations. There are no major structural transformations or new features introduced—this appears to be part of ongoing refinement and performance tuning.

model: qwen-plus-latest
CompletionUsage(completion_tokens=692, prompt_tokens=25972, total_tokens=26664, completion_tokens_details=None, prompt_tokens_details=None)

@dtcxzyw dtcxzyw closed this Jun 6, 2025
@dtcxzyw dtcxzyw deleted the test-run15493211929 branch June 6, 2025 15:47
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.

1 participant