This is an archive of the discontinued LLVM Phabricator instance.

[LV] Refactor integer induction widening (NFC)
ClosedPublic

Authored by mssimpso on Jun 30 2016, 12:03 PM.

Details

Summary

This patch also removes the SCEV variants of getStepVector() since they have no uses after the refactoring. This change was suggested in the review of D21620.

Diff Detail

Repository
rL LLVM

Event Timeline

mssimpso updated this revision to Diff 62395.Jun 30 2016, 12:03 PM
mssimpso retitled this revision from to [LV] Refactor integer induction widening (NFC).
mssimpso updated this object.
mssimpso added a reviewer: anemet.
mssimpso added subscribers: llvm-commits, mcrosier.
anemet accepted this revision.Jul 1 2016, 1:03 PM
anemet edited edge metadata.

Great clean-up! I have a few minor suggestions below.

lib/Transforms/Vectorize/LoopVectorize.cpp
2207–2209 ↗(On Diff #62395)

Can we do a single look-up in an assert-enabled build? I.e. assert(II != end() ...)

2216 ↗(On Diff #62395)

Init is a bit confusing in this context. How about ScalarIV? I think that you can also move this down to after the call to createVectorIntInductionPHI.

4451 ↗(On Diff #62395)

I would rename II to ID or something since it's not an iterator but an InductionDescriptor.

This revision is now accepted and ready to land.Jul 1 2016, 1:03 PM

Thanks, Adam! All your suggestions look good to me so I'll make those changes before committing.

mssimpso marked 3 inline comments as done.Jul 5 2016, 8:35 AM
This revision was automatically updated to reflect the committed changes.