This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Add option to ignore ptrmask in getUnderlyingObject*
AbandonedPublic

Authored by krzysz00 on Jun 26 2023, 10:40 AM.

Details

Reviewers
None
Summary

In some cases (an upcoming pass of mine that deals with a non-integral
address space) we want getUnderlyingObject() to regard the result of a
ptrmask() or other similar intrinsic that performs arbitrary bit
manipulation on a pointer to be considered a new object for analysis
purposes.

This commit supports this usecase by adding AllowBitManipulation as an
option to getUnderlyingObject*(). It will not break existing code
because the option defaults to true, which preserves the existing
behavior.

Diff Detail

Event Timeline

krzysz00 created this revision.Jun 26 2023, 10:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 10:40 AM
krzysz00 requested review of this revision.Jun 26 2023, 10:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 10:40 AM
arsenm added a subscriber: arsenm.Jun 26 2023, 10:43 AM

Needs tests. Also feels like the wrong way to deal with this. The whole point of ptrmask is that it does keep pointing to the underlying object? ptrmask also isn't arbitrary bit manipulation, it's an and

krzysz00 abandoned this revision.Jun 30 2023, 1:57 PM

On further consideation of the underlying problem, I won't need this.