Skip to content

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

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

feat(cse): use dominance to make CSE work across blocks#867
regehr wants to merge 4 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: 69d1ae4 Previous: cc0b571 Ratio
add-fold-worklist/create 2287000 ns (± 91909) 2245000 ns (± 59823) 1.02
add-fold-worklist/rewrite 3943000 ns (± 29871) 3943000 ns (± 62416) 1
add-fold-worklist-local/create 2234000 ns (± 50988) 2268000 ns (± 50000) 0.99
add-fold-worklist-local/rewrite 3272000 ns (± 46949) 3319000 ns (± 31736) 0.99
add-zero-worklist/create 2162000 ns (± 108046) 2235000 ns (± 108232) 0.97
add-zero-worklist/rewrite 2533000 ns (± 86356) 2508000 ns (± 31572) 1.01
add-zero-reuse-worklist/create 1842000 ns (± 89817) 1834000 ns (± 90486) 1.00
add-zero-reuse-worklist/rewrite 2080000 ns (± 45833) 2108000 ns (± 32722) 0.99
mul-two-worklist/create 2350000 ns (± 32311) 2248000 ns (± 109222) 1.05
mul-two-worklist/rewrite 5530000 ns (± 135262) 5544500 ns (± 143297) 1.00
add-fold-forwards/create 2272500 ns (± 110525) 2205000 ns (± 111151) 1.03
add-fold-forwards/rewrite 2981000 ns (± 40144) 2998000 ns (± 62583) 0.99
add-zero-forwards/create 2238000 ns (± 89519) 2291000 ns (± 81627) 0.98
add-zero-forwards/rewrite 1928000 ns (± 32322) 1903000 ns (± 92249) 1.01
add-zero-reuse-forwards/create 1900000 ns (± 86669) 1866500 ns (± 87239) 1.02
add-zero-reuse-forwards/rewrite 1579000 ns (± 34674) 1562000 ns (± 24410) 1.01
mul-two-forwards/create 2270000 ns (± 77911) 2189000 ns (± 55971) 1.04
mul-two-forwards/rewrite 3627000 ns (± 109176) 3612000 ns (± 88471) 1.00
add-zero-reuse-first/create 1917000 ns (± 104591) 1862000 ns (± 71721) 1.03
add-zero-reuse-first/rewrite 8000 ns (± 1837) 8000 ns (± 2593) 1
add-zero-lots-of-reuse-first/create 1932000 ns (± 86431) 1815000 ns (± 64825) 1.06
add-zero-lots-of-reuse-first/rewrite 809000 ns (± 25587) 785000 ns (± 22749) 1.03

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