-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better C++ compatibility and fixes to conditional branch/switch handling #10
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2677273
Add C++ header guard to extension header
mtehver a2a8534
Fix Phi node handling after executing OpBranchConditional, OpSwitch i…
mtehver fc2f6ad
A fix for Phi nodes by keeping track of current block immediate parents
mtehver 463d733
Cleanup the code by keeping original OpLabel locations. Handling of b…
mtehver cb02416
Fixed OpAny and OpAll (previous version only checked first component …
mtehver 1f653d0
Fixes to OpVectorExtractDynamic, OpVectorInsertDynamic, OpCompositeCo…
mtehver 061b21a
Support for OpUndef, additional array bound-checking
mtehver File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
A fix for Phi nodes by keeping track of current block immediate parents
- Loading branch information
commit fc2f6ad437ef14bb6eae4bdeec2b22d0ec1cc91b
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we ever take this branch (except maybe for the entry point)? Couldn't we always handle the update of
function_stack_cfg_parent
,function_stack_cfg
here instead of handling it in every jump instruction?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it seems this can be done. When you debug current code you will see that branch target 'source locations' are not actual
OpLabel
instructions. This is due to the setup phase (spvm_setup_OpLabel
) that movessource_location
of its result record into the next instruction.After changing the corresponding line in
spvm_setup_OpLabel
to
the code in actual branch instructions can be removed.
Should I update the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is valuable and LGTM as it is, no need to change it right away. IMO doing the processing in OpLabel (and changing
source_location
as you proposed) would simplify the code though as it removes duplication but we can also do this later on if you prefer. Thanks for looking into it!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I already pushed this change, it really keeps the code cleaner.