-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[SandboxIR] Added isVolatile args to existing LoadInst::create function #100850
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
Merged
vporpo
merged 5 commits into
llvm:main
from
wizardengineer:_SandboxIR_Added_isVolatile_args_to_LoadInst_create
Jul 28, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f66ee5e
Added isVolatile args in LoadInst::create function
wizardengineer 7855441
removed some unneeded code and clang format
wizardengineer 8e8c94f
small changes
wizardengineer f9266b0
added volatile check for NewLd
wizardengineer 587b557
simple fix
wizardengineer 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
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
This is OK for this PR, but having to specify the
IsVolatile
argument whenever you create non-volatile LoadInsts looks a bit too verbose. The problem is that most of the times you will be creating an instruction with a name, so you can't take advantage of the default value f theIsVolatile=false
argument. And swappingIsVolatile
withName
isn't what most users will expect.If you have time, try creating a follow-up PR with two additional create() functions that don't have the
IsVolatile
argument and remove the default=false
value for these ones. So the functions would be:Then in the body of 2 you would just call 1 with
/*IsVolatile=*/false
, and similarly in the body of 4 you would call 3.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.
Completely understandable in terms of LoadInst looking verbose. Btw, do you still want the
bool IsVolatile
to be before theContext &Ctx
in the follow-up 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.
Yes, that would be even better.
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.
Thank you for the suggestion, I'll start on the follow-up PR.
I was a bit confuse on this. Were you suggesting that this PR will get merge first before creating the follow-up NFC PR? If not, then I'll start on the follow-up.
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.
Yes, let's merge this first and then you can work on top of it.