This is an archive of the discontinued LLVM Phabricator instance.

[LVI] Take guards into account
ClosedPublic

Authored by apilipenko on Aug 10 2016, 9:36 AM.

Details

Summary

Teach LVI to gather control dependant constraints from guards.

Diff Detail

Repository
rL LLVM

Event Timeline

apilipenko updated this revision to Diff 67538.Aug 10 2016, 9:36 AM
apilipenko retitled this revision from to [LVI] Take guards into account.
apilipenko updated this object.
apilipenko added reviewers: sanjoy, reames.
apilipenko added a subscriber: llvm-commits.
sanjoy accepted this revision.Aug 10 2016, 11:07 AM
sanjoy edited edge metadata.

lgtm with some minor comments

lib/Analysis/LazyValueInfo.cpp
868 ↗(On Diff #67538)

Doesn't have to be this change, but please document BBI.

884 ↗(On Diff #67538)

Can this be make conditional on if there are uses of the guard intrinsic? E.g. see HasGuards in ScalarEvolution -- that way clients of LLVM that don't use guards at all won't have to do this linear scan.

886 ↗(On Diff #67538)

Optional -- we could rewrite this as a range for:

for (auto &I : make_range(std::reverse_iterator(BBI->getIterator()), BBI->getParent()->rend()))

(Not sure if that is clearly better)

890 ↗(On Diff #67538)

Is this clang formatted?

This revision is now accepted and ready to land.Aug 10 2016, 11:07 AM
This revision was automatically updated to reflect the committed changes.