-
Notifications
You must be signed in to change notification settings - Fork 692
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
Add a new WeakVH value handle; NFC #6664
Open
lizhengxing
wants to merge
6
commits into
user/zhengxing/Rename-WeakVH-upstream
Choose a base branch
from
user/zhengxing/Add-new-WeakVH-upstream
base: user/zhengxing/Rename-WeakVH-upstream
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add a new WeakVH value handle; NFC #6664
lizhengxing
wants to merge
6
commits into
user/zhengxing/Rename-WeakVH-upstream
from
user/zhengxing/Add-new-WeakVH-upstream
Conversation
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 PR pulls the upstream change, Use accessors for ValueHandleBase::V; NFC (llvm/llvm-project@6f08789), into DXC. Here's the summary of the change: This changes code that touches ValueHandleBase::V to go through getValPtr and (newly added) setValPtr. This functionality will be used later, but also seemed like a generally good cleanup. I also renamed the field to Val, but that's just to make it obvious that I fixed all the uses. This is part 1 of the fix for #6659.
This PR pulls the upstream change, Emulate TrackingVH using WeakVH (llvm/llvm-project@8a62382), into DXC. Here's the summary of the change: This frees up one slot in the HandleBaseKind enum, which I will use later to add a new kind of value handle. The size of the HandleBaseKind enum is important because we store a HandleBaseKind in the low two bits of a (in the worst case) 4 byte aligned pointer. Reviewers: davide, chandlerc Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D32634 This is part 2 of the fix for #6659.
This PR pulls the upstream change, Rename WeakVH to WeakTrackingVH; NFC (llvm/llvm-project@e6bca0e), into DXC. Here's the summary of the change: I plan to use WeakVH to mean "nulls itself out on deletion, but does not track RAUW" in a subsequent commit. Reviewers: dblaikie, davide Reviewed By: davide Subscribers: arsenm, mehdi_amini, mcrosier, mzolotukhin, jfb, llvm-commits, nhaehnle Differential Revision: https://reviews.llvm.org/D32266 This is part 3 of the fix for #6659.
This PR pulls the upstream change, UAdd a new WeakVH value handle; NFC (llvm/llvm-project@f1c0eaf), into DXC. Here's the summary of the change: WeakVH nulls itself out if the value it was tracking gets deleted, but it does not track RAUW. Reviewers: dblaikie, davide Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D32267 This is part 4 of the fix for #6659.
This PR pulls the upstream change, Use a 2 bit pointer in ValueHandleBase::PrevPair; NFC (llvm/llvm-project@b297bff), into DXC. Here's the summary of the change: This was an omission in r301813. I had made the supporting changes to make this happen, but I forgot to actually update the PrevPair declaration. llvm-svn: 301817 This is part 5 of the fix for #6659.
You can test this locally with the following command:git-clang-format --diff e13c18bb4df451c30450929f6b8418cbcc592e46 2afad672de19b6f67b5b91779ad60d02c2473a47 -- include/llvm/IR/ValueHandle.h lib/IR/Value.cpp unittests/IR/ValueHandleTest.cpp View the diff from clang-format here.diff --git a/unittests/IR/ValueHandleTest.cpp b/unittests/IR/ValueHandleTest.cpp
index c38f80fe..5cdad74b 100644
--- a/unittests/IR/ValueHandleTest.cpp
+++ b/unittests/IR/ValueHandleTest.cpp
@@ -118,7 +118,6 @@ TEST_F(ValueHandle, WeakTrackingVH_NullOnDeletion) {
EXPECT_EQ(null_value, WVH_Recreated);
}
-
TEST_F(ValueHandle, AssertingVH_BasicOperation) {
AssertingVH<CastInst> AVH(BitcastV.get());
CastInst *implicit_to_exact_type = AVH;
|
lizhengxing
changed the title
User/zhengxing/add new weak vh upstream
Add a new WeakVH value handle; NFC
May 31, 2024
lizhengxing
force-pushed
the
user/zhengxing/Rename-WeakVH-upstream
branch
2 times, most recently
from
June 12, 2024 03:15
cca3bbf
to
a776a77
Compare
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.
This PR pulls 2 upstream changes, Add a new WeakVH value handle; NFC (llvm/llvm-project@f1c0eaf) and Use a 2 bit pointer in ValueHandleBase::PrevPair; NFC (llvm/llvm-project@b297bff), into DXC.
Here's the summary of the changes:
Add a new WeakVH value handle; NFC
Use a 2 bit pointer in ValueHandleBase::PrevPair; NFC
This is part 4 and 5 of the fix for #6659.