[WIP] progress on rewrite lifting#866
Draft
math-fehr wants to merge 3 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
VeIR Benchmarks
Details
| Benchmark suite | Current: e0e8f6e | Previous: 7121200 | Ratio |
|---|---|---|---|
add-fold-worklist/create |
1891000 ns (± 87617) |
2183000 ns (± 82011) |
0.87 |
add-fold-worklist/rewrite |
3278000 ns (± 83052) |
3979000 ns (± 44215) |
0.82 |
add-fold-worklist-local/create |
1987000 ns (± 97998) |
2203000 ns (± 206240) |
0.90 |
add-fold-worklist-local/rewrite |
10131000 ns (± 185801) |
3322500 ns (± 149674) |
3.05 |
add-zero-worklist/create |
1811000 ns (± 90262) |
2193000 ns (± 110361) |
0.83 |
add-zero-worklist/rewrite |
2103000 ns (± 43738) |
2529500 ns (± 48039) |
0.83 |
add-zero-reuse-worklist/create |
1582000 ns (± 61066) |
1793000 ns (± 59231) |
0.88 |
add-zero-reuse-worklist/rewrite |
1806000 ns (± 64867) |
2090000 ns (± 10991) |
0.86 |
mul-two-worklist/create |
1900000 ns (± 120241) |
2213000 ns (± 95908) |
0.86 |
mul-two-worklist/rewrite |
4537500 ns (± 184953) |
5671000 ns (± 163587) |
0.80 |
add-fold-forwards/create |
1939000 ns (± 94028) |
2212000 ns (± 99204) |
0.88 |
add-fold-forwards/rewrite |
2497000 ns (± 23480) |
3043000 ns (± 35886) |
0.82 |
add-zero-forwards/create |
1932000 ns (± 81571) |
2229000 ns (± 105996) |
0.87 |
add-zero-forwards/rewrite |
1682000 ns (± 54948) |
1950500 ns (± 79487) |
0.86 |
add-zero-reuse-forwards/create |
1514000 ns (± 74740) |
1815000 ns (± 72102) |
0.83 |
add-zero-reuse-forwards/rewrite |
1337000 ns (± 12806) |
1544000 ns (± 24238) |
0.87 |
mul-two-forwards/create |
1947000 ns (± 93371) |
2182000 ns (± 60400) |
0.89 |
mul-two-forwards/rewrite |
2931000 ns (± 102233) |
3631000 ns (± 79364) |
0.81 |
add-zero-reuse-first/create |
1611500 ns (± 88661) |
1811000 ns (± 71387) |
0.89 |
add-zero-reuse-first/rewrite |
11000 ns (± 1846) |
8000 ns (± 1404) |
1.38 |
add-zero-lots-of-reuse-first/create |
1590000 ns (± 86049) |
1884000 ns (± 71613) |
0.84 |
add-zero-lots-of-reuse-first/rewrite |
695000 ns (± 51005) |
774000 ns (± 37689) |
0.90 |
This comment was automatically generated by workflow using github-action-benchmark.
cfce77f to
4b27368
Compare
4b27368 to
3bdb34f
Compare
e8a1632 to
f45dc66
Compare
87f1c6e to
353f489
Compare
These lemmas are similar to the ones about `setResultValues` in that they show preservation of `EquationLemmaAt` and `DefinesDominating`. These required additional simple lemmas, and additional axioms about dominance.
4058043 to
ecc835e
Compare
This is similar to `BlockPtr.getArguments`, but maps it to grab only the type.
dfeb85a to
241c603
Compare
…lockIn') Add RewrittenAt.of_fromLocalRewrite connecting the concrete LocalRewritePattern driver to the abstract RewrittenAt relation. Proves the keystone reduction (driver's worklist-threaded forIn loops reduce to a pure WfRewriter foldlM), the operationList split helper, a generic foldlM invariant-transport lemma, the insertOp/replaceValue/eraseOp ctx bridges, and the blockIn'/srcList/newValuesSize/ opNotFunction fields. Remaining RewrittenAt fields are scoped sorries. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> feat(soundness): prove survives/opErased/blocksInBounds/regionsInBounds fields Add WithCreatedOps + eraseOp survival helpers (hSurviveOp/Block/Region) and use them to discharge the bounds-preservation fields of RewrittenAt.of_fromLocalRewrite. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> feat(soundness): prove newOpsFresh and mappingFixesNonResults fields Add hOpBnd (bidirectional non-op bounds across the rewrite) to transport ReturnOps freshness; mappingFixesNonResults is the else-branch of rewriteMapping. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> feat(soundness): prove mapNonResultsInBounds field Add hSurviveVal (value survival across folds + eraseOp when the value's owner is not op) and discharge mapNonResultsInBounds via getResults! membership. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> docs(soundness): categorize remaining RewrittenAt sorries Mark which fields need an extra pattern hypothesis (newValuesInBounds, mapResultsInBounds, newValuesAreResults, newCtxDom, newCtxVerif) vs deep operationList/GetSet plumbing through the foldlM (tgtList, otherBlocks, frame, parentOps, blockArgsPreserved, opRegionsPreserved, regionFirstBlockPreserved). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Done refactoring with isRefinedByAt A few less fields Remove two sorries from lifting lemma remove bad constraint One less sorry One less sorry One less sorry Last sorry Removing sorries from fromLocalRewrite One less argument in fromLocalRewrite soundness Check for parent in rewriter Preservation of parent Thread EquationLemmaAt Step 2 of last proof Magic Done modulus 3 axioms Add axioms Add global proof about GreedyRewritePattern Finish proof
241c603 to
94c59f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the current status of proving the lifting between the soundness of local rewrites to module refinements