This is an archive of the discontinued LLVM Phabricator instance.

Make AssumptionCache's interface return a range of Values
Needs ReviewPublic

Authored by yabash on Apr 13 2017, 3:39 PM.

Details

Reviewers
pcc
hfinkel
Summary

Instead of returning a range of WeakVHs,
forcing every user of the interface to check the WeakVH before using it,
return a range which filters out the null WeakVHs and dereferences it.

This is a fix for a FIXME by @djasper.

Diff Detail

Event Timeline

yabash created this revision.Apr 13 2017, 3:39 PM
yabash added a reviewer: pcc.Apr 16 2017, 3:21 AM
yabash updated this revision to Diff 97199.Apr 29 2017, 2:12 PM

Fix comments and rebase.
Also, ping for reviews.

hfinkel added inline comments.May 7 2017, 6:52 PM
include/llvm/Analysis/AssumptionCache.h
125

Our general convention for variables is that they start with a capital letter (for acronyms, this sometimes means we have variable names in all caps, but that's okay). So:

wvh -> WVH
lib/Transforms/InstCombine/InstCombineSelect.cpp
1479

This line is more than 80 characters; please wrap.

yabash updated this revision to Diff 98897.May 13 2017, 10:03 AM

Fixed and rebased.

yabash marked 2 inline comments as done.May 13 2017, 10:04 AM

Can someone review this please?