This is an archive of the discontinued LLVM Phabricator instance.

Unroll once when -unroll-count is set
ClosedPublic

Authored by evstupac on May 27 2016, 7:31 PM.

Details

Summary

Set disable unroll, when loop is unrolled once even if there were no metadata.
(basically for "-unroll-count" passed case)

Diff Detail

Repository
rL LLVM

Event Timeline

evstupac updated this revision to Diff 58876.May 27 2016, 7:31 PM
evstupac retitled this revision from to Unroll once when -unroll-count is set.
evstupac updated this object.
evstupac added reviewers: mzolotukhin, sanjoy.
evstupac set the repository for this revision to rL LLVM.
evstupac added a subscriber: llvm-commits.
mzolotukhin requested changes to this revision.Jun 1 2016, 4:41 PM
mzolotukhin edited edge metadata.

Hi Evgeny,

The change looks good, but I'd like the test to be changed. We don't need to run entire O2 pipeline for it. If you're trying to catch some behavior of the second invocation of loop-unroll, please just add IR from right before that as another test.

Thanks,
Michael

test/Transforms/LoopUnroll/runtime-count.ll
1 ↗(On Diff #58877)

Please run only -loop-unroll, not entire -O2.

This revision now requires changes to proceed.Jun 1 2016, 4:41 PM
evstupac updated this revision to Diff 59451.Jun 2 2016, 1:25 PM
evstupac edited edge metadata.

test fixed

mzolotukhin accepted this revision.Jun 2 2016, 5:14 PM
mzolotukhin edited edge metadata.

LGTM with a minor remark below.

Michael

test/Transforms/LoopUnroll/unroll-count.ll
2

The test doesn't check that unrolling occurs only once, it only checks if the metadata is set after unrolling - this is totally fine, I just think the comment is slightly off.

This revision is now accepted and ready to land.Jun 2 2016, 5:14 PM

committed revision 272195