perf: pass state variables by value in tco exec handlers#2121
Merged
Conversation
VmExecStateVmExecState by value in exec handlers
8b6e584 to
e65a3d2
Compare
This comment has been minimized.
This comment has been minimized.
VmExecState by value in exec handlerspc, 'instret by value in tco` exec handlers
pc, 'instret by value in tco` exec handlerspc, instret by value in tco exec handlers
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
381715d to
c521941
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
642a8c4 to
9624590
Compare
This comment has been minimized.
This comment has been minimized.
pc, instret by value in tco exec handlerspc, instret, instret_end by value in tco exec handlers
pc, instret, instret_end by value in tco exec handlerstco exec handlers
This comment has been minimized.
This comment has been minimized.
cd4c360 to
1075439
Compare
This comment has been minimized.
This comment has been minimized.
tco exec handlerstco exec handlers
Contributor
There was a problem hiding this comment.
nit: perhaps it'd be nice to have an inst_inc! or inst_advance!` macro to make these changes more uniform for later
Collaborator
Author
There was a problem hiding this comment.
i'll keep this for later when i try to get rid of pc
jonathanpwang
approved these changes
Sep 6, 2025
jonathanpwang
left a comment
Contributor
There was a problem hiding this comment.
Overall it was not as bad as I thought. I do wonder if we could use some more macros to clean up all the places you had to change, but that's another story.
LGTM except the pc, instret fields in VmState should now be private and you should only be allowed to mutate them via some conscious decision via a function.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
75148ad to
4124219
Compare
This comment has been minimized.
This comment has been minimized.
Commit: 9242af6 |
jonathanpwang
approved these changes
Sep 7, 2025
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.
pc,instretandinstret_end/max_execution_cost/segment_check_insnsby value in execution handlers to get them to be passed in registerslikely,unlikelyhints for suspension/termination intcobenchmark comparison
Towards INT-4921