This is an archive of the discontinued LLVM Phabricator instance.

[Safepoint Verifier] gc.relocate does not change the constant property.
ClosedPublic

Authored by skatkov on Feb 14 2022, 6:19 AM.

Details

Summary

Add traverse through gc.relocate in determining whether base is constant.

Diff Detail

Event Timeline

skatkov created this revision.Feb 14 2022, 6:19 AM
skatkov requested review of this revision.Feb 14 2022, 6:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2022, 6:19 AM
anna accepted this revision.Feb 14 2022, 6:43 AM

LGTM with a comment. Great job on root causing and fixing this!

JFYI, this was *one of the false positives* we could see in SafepointVerifier. We just never saw this in practice. It just started showing up a lot more in our downstream code after this NFC: https://reviews.llvm.org/D118604

llvm/lib/IR/SafepointIRVerifier.cpp
360

Very nice. Could you pls add a comment here as well, that GCRelocates do not change null-ness or constant-ness of the value. So, this would allow us to recognize if the value is either: isExclusivelyDerivedFromNull OR ExclusivelyNull.

This revision is now accepted and ready to land.Feb 14 2022, 6:43 AM
reames accepted this revision.Feb 14 2022, 8:08 AM

LGTM as well.

This revision was landed with ongoing or failed builds.Feb 14 2022, 9:19 PM
This revision was automatically updated to reflect the committed changes.