Page MenuHomePhabricator

[NFC] [LV] Vectorized Loop Skeleton Refactoring
AcceptedPublic

Authored by bmahjour on Tue, Jul 14, 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

Unit TestsFailed

TimeTest
190 mslinux > Polly.ScopInfo::Unknown Unit Message ("")
Script: -- : 'RUN: at line 1'; opt -polly-process-unprofitable -polly-remarks-minimal -polly-use-llvm-names -polly-import-jscop-dir=/mnt/disks/ssd0/agent/llvm-project/polly/test/ScopInfo -polly-codegen-verify -basic-aa -scoped-noalias -tbaa -polly-scops -analyze < /mnt/disks/ssd0/agent/llvm-project/polly/test/ScopInfo/memcpy-raw-source.ll

Event Timeline

bmahjour created this revision.Tue, Jul 14, 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.EditedFri, Jul 24, 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.Fri, Jul 24, 12:22 PM
bmahjour updated this revision to Diff 280599.Fri, Jul 24, 3:05 PM

fix clang-format issue.

bmahjour updated this revision to Diff 280601.Fri, Jul 24, 3:10 PM
This revision is now accepted and ready to land.Thu, Jul 30, 8:14 AM