Skip to content

[SandboxIR][NFC] GenericSetter tracker class #102260

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
merged 1 commit into from
Aug 8, 2024
Merged

[SandboxIR][NFC] GenericSetter tracker class #102260

merged 1 commit into from
Aug 8, 2024

Conversation

vporpo
Copy link
Contributor

@vporpo vporpo commented Aug 7, 2024

This patch introduces the GenericSetter tracker class that can be used to track and revert simple instruction setters.

This patch also replaces several setter tracker classes with the generic one.

@@ -687,7 +689,10 @@ void LoadInst::dump() const {
void StoreInst::setVolatile(bool V) {
auto &Tracker = Ctx.getTracker();
if (Tracker.isTracking())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might even be able to factor out if (Tracker.isTracking()) somehow with another helper method. but maybe that's not good for consistency with the other trackers that don't use GenericSetter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I am not sure I follow how this could be done. Could you elaborate?

Perhaps we could move the isTracking() check inside track() and have it create the object internally instead of having to create the object with make_unique and passing it as an argument.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, something like that. The part about it conditionally creating the object internally is the tricky part.

@@ -687,7 +689,10 @@ void LoadInst::dump() const {
void StoreInst::setVolatile(bool V) {
auto &Tracker = Ctx.getTracker();
if (Tracker.isTracking())
Tracker.track(std::make_unique<SetVolatile>(this, Tracker));
Tracker.track(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multi-line ifs should have braces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the ones related to this patch, but there are plenty more. I will fix them separately.

This patch introduces the `GenericSetter` tracker class that can be used
to track and revert simple instruction setters.

This patch also replaces several setter tracker classes with the generic one.
@vporpo vporpo merged commit 4fe33d0 into llvm:main Aug 8, 2024
4 of 6 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 8, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-darwin running on doug-worker-3 while building llvm at step 2 "checkout".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/1735

Here is the relevant piece of the build log for the reference:

Step 2 (checkout) failure: update (failure)
git version 2.39.3 (Apple Git-146)
fatal: unable to access 'https://github.com/llvm/llvm-project.git/': Failed to connect to github.com port 443 after 75089 ms: Couldn't connect to server
fatal: unable to access 'https://github.com/llvm/llvm-project.git/': Failed to connect to github.com port 443 after 75159 ms: Couldn't connect to server

qiaojbao pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Aug 29, 2024
…38fbc60f8

Local branch amd-gfx 5fa38fb [AMDGPU] Extend virtual register use to redefined strict WQM registers
Remote branch main 4fe33d0 [SandboxIR][NFC] GenericSetter tracker class (llvm#102260)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants