Page MenuHomePhabricator

Update CaptureTracker so psub does not capture operands if possible

Authored by aqjune on Jan 11 2019, 8:02 AM.



This is a patch that shows how llvm.psub intrinsic function ( can make CaptureTracker smarter.

If two pointers p1 and p2 (which are given to llvm.psub call) are both from logical pointers, meaning that neither of them are based on inttoptr cast, CaptureTracker can assume that the call captures neither of its operands.

Diff Detail

Event Timeline

aqjune created this revision.Jan 11 2019, 8:02 AM

I may not be the best to approve this change. Here are some high-level comments though.


This is a fairly extensive API change.
If TLI was set to default to nullptr here, will you still need to change all callsites to achieve your goal for psub intrinsics?


If the only current call to isGuaranteedToBeLogicalPointer sets LI to nullptr, I would remove it from the signature, and pass nullptr to GetUnderlyingObjects.

aqjune abandoned this revision.Jan 23 2019, 10:18 AM

Abandon this patch; will a new patch be uploaded later