Skip to content

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

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

feat(cse): use dominance to make CSE work across blocks#867
regehr wants to merge 6 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: b11fbb8 Previous: a8086a5 Ratio
add-fold-worklist/create 1678000 ns (± 63097) 2191000 ns (± 116585) 0.77
add-fold-worklist/rewrite 2739000 ns (± 133798) 4025500 ns (± 99281) 0.68
add-fold-worklist-local/create 1712000 ns (± 42515) 2104000 ns (± 59879) 0.81
add-fold-worklist-local/rewrite 2401000 ns (± 31396) 3305000 ns (± 90508) 0.73
add-zero-worklist/create 1720000 ns (± 97465) 2234000 ns (± 109081) 0.77
add-zero-worklist/rewrite 1852500 ns (± 121917) 2750000 ns (± 105299) 0.67
add-zero-reuse-worklist/create 1455000 ns (± 69226) 1842000 ns (± 83972) 0.79
add-zero-reuse-worklist/rewrite 1605000 ns (± 80603) 2160000 ns (± 52555) 0.74
mul-two-worklist/create 1772500 ns (± 113401) 2231000 ns (± 55895) 0.79
mul-two-worklist/rewrite 4006500 ns (± 116351) 5644500 ns (± 283151) 0.71
add-fold-forwards/create 1622000 ns (± 76819) 2202000 ns (± 109662) 0.74
add-fold-forwards/rewrite 2173000 ns (± 19537) 3032000 ns (± 65213) 0.72
add-zero-forwards/create 1664000 ns (± 132990) 2265000 ns (± 96205) 0.73
add-zero-forwards/rewrite 1430500 ns (± 73123) 1987500 ns (± 93854) 0.72
add-zero-reuse-forwards/create 1463000 ns (± 65957) 1832000 ns (± 89057) 0.80
add-zero-reuse-forwards/rewrite 1195000 ns (± 13096) 1542000 ns (± 22638) 0.77
mul-two-forwards/create 1777000 ns (± 81470) 2198000 ns (± 41455) 0.81
mul-two-forwards/rewrite 2600000 ns (± 30491) 3767000 ns (± 172147) 0.69
add-zero-reuse-first/create 1436500 ns (± 58769) 1855500 ns (± 114257) 0.77
add-zero-reuse-first/rewrite 11000 ns (± 1736) 8500 ns (± 2543) 1.29
add-zero-lots-of-reuse-first/create 1371000 ns (± 64578) 1789000 ns (± 89329) 0.77
add-zero-lots-of-reuse-first/rewrite 625000 ns (± 22766) 803000 ns (± 57817) 0.78

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