feat: towards support for globals - #1139
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
VeIR Benchmarks
Details
| Benchmark suite | Current: 171e279 | Previous: e995cda | Ratio |
|---|---|---|---|
add-fold-worklist/create |
1900000 ns (± 110274) |
2266000 ns (± 118215) |
0.84 |
add-fold-worklist/rewrite |
3832500 ns (± 59435) |
4192500 ns (± 63611) |
0.91 |
add-fold-worklist-local/create |
1925000 ns (± 48680) |
2301000 ns (± 113070) |
0.84 |
add-fold-worklist-local/rewrite |
4671000 ns (± 70163) |
5204000 ns (± 184667) |
0.90 |
add-zero-worklist/create |
2028500 ns (± 91143) |
2257000 ns (± 98643) |
0.90 |
add-zero-worklist/rewrite |
2753500 ns (± 41289) |
3009000 ns (± 28429) |
0.92 |
add-zero-reuse-worklist/create |
1581000 ns (± 23249) |
1914000 ns (± 75035) |
0.83 |
add-zero-reuse-worklist/rewrite |
2386000 ns (± 25851) |
2678000 ns (± 93937) |
0.89 |
mul-two-worklist/create |
1918000 ns (± 99760) |
2234500 ns (± 112485) |
0.86 |
mul-two-worklist/rewrite |
5368500 ns (± 156944) |
5918000 ns (± 161062) |
0.91 |
add-fold-forwards/create |
1922000 ns (± 86875) |
2290000 ns (± 72400) |
0.84 |
add-fold-forwards/rewrite |
2713000 ns (± 32334) |
3012000 ns (± 11606) |
0.90 |
add-zero-forwards/create |
1898000 ns (± 80315) |
2343000 ns (± 112877) |
0.81 |
add-zero-forwards/rewrite |
1732000 ns (± 25446) |
2007000 ns (± 68057) |
0.86 |
add-zero-reuse-forwards/create |
1554000 ns (± 17326) |
1893000 ns (± 85786) |
0.82 |
add-zero-reuse-forwards/rewrite |
1390000 ns (± 16053) |
1563000 ns (± 34470) |
0.89 |
mul-two-forwards/create |
1902000 ns (± 97085) |
2233000 ns (± 94401) |
0.85 |
mul-two-forwards/rewrite |
3333000 ns (± 103331) |
3673000 ns (± 187633) |
0.91 |
add-zero-reuse-first/create |
1582000 ns (± 54048) |
1888000 ns (± 56993) |
0.84 |
add-zero-reuse-first/rewrite |
9000 ns (± 0) |
8000 ns (± 0) |
1.13 |
add-zero-lots-of-reuse-first/create |
1581500 ns (± 68888) |
2002000 ns (± 58122) |
0.79 |
add-zero-lots-of-reuse-first/rewrite |
770000 ns (± 38335) |
830000 ns (± 25205) |
0.93 |
This comment was automatically generated by workflow using github-action-benchmark.
math-fehr
approved these changes
Jul 28, 2026
math-fehr
left a comment
Collaborator
There was a problem hiding this comment.
Nice! I think I only have one two comments that should be addressed, the rest is comments where we should probably create an issue about it and fix it later.
regehr
marked this pull request as draft
July 28, 2026 14:44
regehr
marked this pull request as ready for review
July 29, 2026 04:13
Collaborator
Author
|
@math-fehr comments addressed and code improved, ready for another quick look, thanks! |
math-fehr
approved these changes
Jul 29, 2026
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 PR registers mlir__global and mlir__addressof, and then follows through with other code supporting this such as verifier support
the short-term goal (not nearly achieved yet) is to run
Test/LLVM/global_load_store.mlirthough the veir interpreter. this test simple loads from an i32 global, increments the value, and uses the result to store back to the global and also returns it from main().