- Notifications
You must be signed in to change notification settings - Fork 14.9k
[SandboxIR] Added setVolatile member function to LoadInst and StoreInst #101284
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
[SandboxIR] Added setVolatile member function to LoadInst and StoreInst #101284
Conversation
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
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.
We also need to test the SetVolatile
tracker object with a test in llvm/unittests/SandboxIR/TrackerTest.cpp
. See how it's done in the existing tests.
You start tracking with Ctx.save()
, then you will set the volatile value Store->setVolatile(true)
then you will check that it was actually set EXPECT_TRUE(Store->isVolatile())
, then you will revert the state of the IR with Ctx.revert()
and check that the volatile flag was back to its original value EXPECT_FALSE(Store->isVolatile())
.
Same for the Load (in the same test).
Need to close this PR and create a new one to resolve the branch conflicts. |
This patch include the implementation of setVolatile() for the LoadInst and StoreInst. Along with test cases.
cc: @vporpo