This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Try a bit harder to find reduction PHIs
ClosedPublic

Authored by chatur01 on Oct 26 2015, 6:35 AM.

Details

Summary

Currently, when the SLP vectorizer considers whether a phi is part of a reduction, it dismisses phi's whose incoming blocks are not the same as the block containing the phi. For the patterns I'm looking at, extending this rule to allow phis whose incoming block is a containing loop latch allows me to vectorize certain workloads.

There is no significant compile-time impact, and combined with D13949, no performance improvement measured in ARM/AArch64 in any of SPEC2000, SPEC2006 or LNT.

Diff Detail

Event Timeline

chatur01 retitled this revision from to [SLP] Try a bit harder to find reduction PHIs.
chatur01 updated this object.
chatur01 added reviewers: nadav, jmolloy, mcrosier.
chatur01 set the repository for this revision to rL LLVM.
chatur01 added a subscriber: llvm-commits.
nadav edited edge metadata.Oct 26 2015, 9:15 AM
nadav added a subscriber: nadav.

I am okay with this change, but I have a few comments on the patch:

  1. Please try to write a smaller testcase.
  2. Please document the new helper function (doxygen style is fine)
  3. Please document the body of the new helper function.

Thanks,
Nadav

chatur01 edited edge metadata.
chatur01 removed rL LLVM as the repository for this revision.

Address review comments.
Thanks again Nadav!

LGTM. Please commit.

This revision was automatically updated to reflect the committed changes.