-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Arm64: Make unroll code for cpblk non-interruptible #69202
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -440,18 +440,10 @@ void Lowering::LowerBlockStore(GenTreeBlk* blkNode) | |
|
|
||
| if (blkNode->OperIs(GT_STORE_OBJ)) | ||
| { | ||
| if (!blkNode->AsObj()->GetLayout()->HasGCPtr()) | ||
| if (!blkNode->AsObj()->GetLayout()->HasGCPtr() || (isDstAddrLocal && (size <= copyBlockUnrollLimit))) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a bug: before, if So, if both isSrcAddrLocal and isDstAddrLocal are true, we won't disable GC. However, the thing we are copying contains GC pointers in this case, and the GC pointers loaded into temporary registers aren't reported, so we have a GC hole.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's true. I missed that case. |
||
| { | ||
| blkNode->SetOper(GT_STORE_BLK); | ||
| } | ||
| else if (isDstAddrLocal && (size <= copyBlockUnrollLimit)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like we don't need the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was trying to consolidate the
So basically, if we are doing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With that being the case, I missed a case for objects that has GC pointers. Fixed in #70053 |
||
| { | ||
| // If the size is small enough to unroll then we need to mark the block as non-interruptible | ||
| // to actually allow unrolling. The generated code does not report GC references loaded in the | ||
| // temporary register(s) used for copying. | ||
| blkNode->SetOper(GT_STORE_BLK); | ||
| blkNode->gtBlkOpGcUnsafe = true; | ||
| } | ||
| } | ||
|
|
||
| if (blkNode->OperIs(GT_STORE_OBJ)) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.