This is an archive of the discontinued LLVM Phabricator instance.

Add another InstCombine pass after LoopUnroll
ClosedPublic

Authored by wmi on May 14 2015, 11:20 AM.

Details

Summary

This is to cleanup some redundency generated by LoopUnroll pass. Such redundency may not be cleaned up by existing latter passes.
The problem is described in https://llvm.org/bugs/show_bug.cgi?id=23524.

I tested spec2000 and internal benchmarks and I saw no performance difference.

Diff Detail

Repository
rL LLVM

Event Timeline

wmi updated this revision to Diff 25791.May 14 2015, 11:20 AM
wmi retitled this revision from to Add another InstCombine pass after LoopUnroll.
wmi updated this object.
wmi edited the test plan for this revision. (Show Details)
wmi added reviewers: qcolombet, hfinkel.
wmi set the repository for this revision to rL LLVM.
wmi added subscribers: Unknown Object (MLST), davidxl.
qcolombet accepted this revision.May 14 2015, 1:45 PM
qcolombet edited edge metadata.

Hi Wei,

LGTM with some fixes on the test case.

Thanks,
-Quentin

test/Transforms/LoopUnroll/unroll-cleanup.ll
24 ↗(On Diff #25791)

Please run “opt -instnamer” on the input test to get rid of %[0-9]+ names. Those are a pain in the neck when we want to update the test.

83 ↗(On Diff #25791)

Do you really need all those attributes to expose the problem?

This revision is now accepted and ready to land.May 14 2015, 1:45 PM
wmi updated this revision to Diff 25815.May 14 2015, 2:51 PM
wmi edited edge metadata.

Quentin, Thanks for the review.

I run “opt -instnamer” on the input test.
Without the attribute, opt will not unroll the loop. I replaced the attribute with a loop pragma.

Wei.

Again LGTM.

Thanks!

Q.

test/Transforms/LoopUnroll/unroll-cleanup.ll
2 ↗(On Diff #25815)

Maybe mention the PR you are fixing here.

wmi added inline comments.May 14 2015, 2:59 PM
test/Transforms/LoopUnroll/unroll-cleanup.ll
2 ↗(On Diff #25815)

Done.

This revision was automatically updated to reflect the committed changes.