Skip to content

feat(cse): use dominance to make CSE work across blocks#867

Draft
regehr wants to merge 5 commits into
mainfrom
regehr/cse-multi-block
Draft

feat(cse): use dominance to make CSE work across blocks#867
regehr wants to merge 5 commits into
mainfrom
regehr/cse-multi-block

Conversation

@regehr

@regehr regehr commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

ok it looks like this bit is actually load-bearing:

  -- `domCtx` keeps a stable handle on the original context after
  -- `ctx` is shadowed by the mutable copy.
  let domCtx := ctx.raw

this is worrisome to me because I don't understand the consequences

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VeIR Benchmarks

Details
Benchmark suite Current: 25ee983 Previous: 0fb06d1 Ratio
add-fold-worklist/create 2836000 ns (± 205304) 2363500 ns (± 142914) 1.20
add-fold-worklist/rewrite 3885000 ns (± 79735) 3862000 ns (± 89211) 1.01
add-fold-worklist-local/create 2761000 ns (± 208610) 2319000 ns (± 43764) 1.19
add-fold-worklist-local/rewrite 3270500 ns (± 88000) 3243000 ns (± 16956) 1.01
add-zero-worklist/create 2793000 ns (± 118063) 2370000 ns (± 67833) 1.18
add-zero-worklist/rewrite 2516000 ns (± 38760) 2440000 ns (± 110726) 1.03
add-zero-reuse-worklist/create 2415500 ns (± 228076) 1952000 ns (± 79423) 1.24
add-zero-reuse-worklist/rewrite 2155500 ns (± 114254) 2031000 ns (± 45637) 1.06
mul-two-worklist/create 2746000 ns (± 98043) 2318500 ns (± 113259) 1.18
mul-two-worklist/rewrite 5366000 ns (± 32086) 5460000 ns (± 67150) 0.98
add-fold-forwards/create 2741500 ns (± 231620) 2233000 ns (± 111607) 1.23
add-fold-forwards/rewrite 2908000 ns (± 82817) 2892000 ns (± 47901) 1.01
add-zero-forwards/create 2833000 ns (± 121403) 2138000 ns (± 94887) 1.33
add-zero-forwards/rewrite 1959000 ns (± 80556) 1853000 ns (± 20849) 1.06
add-zero-reuse-forwards/create 2358000 ns (± 172252) 1965000 ns (± 32277) 1.20
add-zero-reuse-forwards/rewrite 1624000 ns (± 124248) 1560000 ns (± 55053) 1.04
mul-two-forwards/create 2829000 ns (± 124011) 2218000 ns (± 110558) 1.28
mul-two-forwards/rewrite 3585000 ns (± 102734) 3577000 ns (± 74570) 1.00
add-zero-reuse-first/create 2368000 ns (± 168896) 1857500 ns (± 121827) 1.27
add-zero-reuse-first/rewrite 9000 ns (± 2180) 8000 ns (± 1925) 1.13
add-zero-lots-of-reuse-first/create 2407500 ns (± 216129) 1907500 ns (± 97143) 1.26
add-zero-lots-of-reuse-first/rewrite 900000 ns (± 87023) 764000 ns (± 49366) 1.18

This comment was automatically generated by workflow using github-action-benchmark.

@regehr regehr marked this pull request as draft June 13, 2026 16:31
@regehr regehr force-pushed the regehr/cse-multi-block branch from 8fb791f to 5d9b35d Compare June 13, 2026 16:31
regehr added 2 commits June 13, 2026 11:04
…ominator data structures to be robust with respect to removing operations
@regehr

regehr commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

NB: this PR cannot be merged until dominance is robust with respect to deleting instructions

@axelcool1234

Copy link
Copy Markdown
Collaborator

I'll make sure to unblock this soon John 😎

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