This is an archive of the discontinued LLVM Phabricator instance.

Replace three "strip & accumulate" implementations with a single one
ClosedPublic

Authored by jdoerfert on Jul 9 2019, 8:11 PM.

Details

Summary

This patch replaces the three almost identical "strip & accumulate"
implementations for constant pointer offsets with a single one,
combining the respective functionalities. The old interfaces are kept
for now.

Diff Detail

Repository
rL LLVM

Event Timeline

jdoerfert created this revision.Jul 9 2019, 8:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 9 2019, 8:11 PM
jdoerfert updated this revision to Diff 208987.Jul 10 2019, 9:20 AM

Improve wording, as requested in D64258

spatel added inline comments.Jul 10 2019, 10:16 AM
llvm/include/llvm/IR/Value.h
565–569 ↗(On Diff #208987)

Thanks - the nullptr note is helpful.

I don't know the rest of this code very well, so I'll let others review.

Not really familiar with this code, not sure i can review this, too.
If you state that you've run test-suite with this (and/or check-all of stage-2 clang), i could stamp though i guess.

hfinkel accepted this revision.Jul 10 2019, 4:10 PM

LGTM

llvm/lib/Analysis/InstructionSimplify.cpp
652 ↗(On Diff #208987)

This comment should be updated to say:

When AllowNonInbounds is false, the results are usable for icmp ult/etc. folding.
This revision is now accepted and ready to land.Jul 10 2019, 4:10 PM
This revision was automatically updated to reflect the committed changes.