Page MenuHomePhabricator

Introduce MaxUsesToExplore argument to capture tracking
ClosedPublic

Authored by apilipenko on Nov 28 2018, 6:34 PM.

Details

Summary

Currently CaptureTracker gives up if it encounters a value with more than 20 uses. The motivation for this cap is to keep it relatively cheap for BasicAliasAnalysis use case, where the results can't be cached. Although, other clients of CaptureTracker might be ok with higher cost. This patch introduces an argument for PointerMayBeCaptured functions to specify the max number of uses to explore. The motivation for this change is a downstream user of CaptureTracker, but I believe upstream clients of CaptureTracker might also benefit from more fine grained cap.

Diff Detail

Repository
rL LLVM

Event Timeline

apilipenko created this revision.Nov 28 2018, 6:34 PM

Can you please upload the patch with full context?

I think this makes sense, and is consistent with how we expose the depth threshold in GetUnderlyingObject (and similar).

Add diff with context.

This revision is now accepted and ready to land.Nov 29 2018, 11:32 AM
This revision was automatically updated to reflect the committed changes.