This is an archive of the discontinued LLVM Phabricator instance.

[NFC] [LV] Vectorized Loop Skeleton Refactoring
ClosedPublic

Authored by bmahjour on Jul 14 2020, 3:20 PM.

Details

Summary

This patch tries to improve readability and maintenance of createVectorizedLoopSkeleton by reorganizing some lines, updating some of the comments and breaking it up into smaller logical units.

Diff Detail

Event Timeline

bmahjour created this revision.Jul 14 2020, 3:20 PM

This refactoring looks reasonable to me. I've left some comments inline.

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
670

nit: return it.

673

Perhaps the comment could be updated for clarity as:
.. to resume loop trip count from where the vectorized loop left off ..

679

s/branchs/branches

3066

Should we assert if OrigLoopID is null?

bmahjour updated this revision to Diff 280550.EditedJul 24 2020, 12:21 PM
bmahjour marked an inline comment as done.

Address @pjeeva01 's comments, and sync with ToT.

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
3066

No, because the original loop may not have any metadata to begin with.

bmahjour marked 4 inline comments as done.Jul 24 2020, 12:22 PM
bmahjour updated this revision to Diff 280599.Jul 24 2020, 3:05 PM

fix clang-format issue.

bmahjour updated this revision to Diff 280601.Jul 24 2020, 3:10 PM
This revision is now accepted and ready to land.Jul 30 2020, 8:14 AM
This revision was landed with ongoing or failed builds.Aug 4 2020, 11:51 AM
This revision was automatically updated to reflect the committed changes.