This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Add a isIVNeverPoison helper
AbandonedPublic

Authored by sanjoy on Feb 27 2017, 10:56 PM.

Details

Summary

NFC right now (since the only user is the unit test), but will be used
in a future change.

Event Timeline

sanjoy created this revision.Feb 27 2017, 10:56 PM
reames requested changes to this revision.Jun 5 2017, 12:30 PM
reames added a subscriber: reames.
reames added inline comments.
include/llvm/Analysis/ValueTracking.h
455

Hm, this interface seems likely problematic. How does this handle the case where poison can be introduced by two different sources? Do we need an iterator abstraction? Or can we reliably just return null for those?

(If the later, please clarify in the comment.)

lib/Analysis/ValueTracking.cpp
3900

What prevents this induction variable from being part of a longer phi cycle? i.e. a indvar with conditional increments for instance? i.e. this shouldn't be an assert of the documentation needs updated.

This revision now requires changes to proceed.Jun 5 2017, 12:30 PM
sanjoy added inline comments.Jun 17 2017, 3:17 PM
include/llvm/Analysis/ValueTracking.h
455

It is the latter, will fix the comment.

lib/Analysis/ValueTracking.cpp
3900

Good point -- at this layer it is probably best to just bail out in that case.

sanjoy updated this revision to Diff 103081.Jun 19 2017, 11:30 AM
sanjoy edited edge metadata.
reames accepted this revision.Jun 22 2017, 1:51 PM

LGTM

This revision is now accepted and ready to land.Jun 22 2017, 1:51 PM
sanjoy abandoned this revision.Jan 29 2022, 5:37 PM