This is an archive of the discontinued LLVM Phabricator instance.

[LoopVectorize] Pass parameters explicitly to MemoryDepChecker
ClosedPublic

Authored by anemet on Jan 29 2015, 4:53 PM.

Details

Summary

Rather than using globals. This prepares the class to be moved outside the
LoopVectorizer.

It's not great how all these are passed through in LoopAccessAnalysis but this
is all expected to change once the class start servicing the Loop Distribution
pass as well where these parameters make no sense.

NFC. This is part of the patchset that splits out the memory dependence logic
from LoopVectorizationLegality into a new class LoopAccessAnalysis.
LoopAccessAnalysis will be used by the new Loop Distribution pass.

Diff Detail

Event Timeline

anemet updated this revision to Diff 19013.Jan 29 2015, 4:53 PM
anemet retitled this revision from to [LoopVectorize] Pass parameters explicitly to MemoryDepChecker.
anemet updated this object.
anemet edited the test plan for this revision. (Show Details)
anemet added reviewers: hfinkel, aschwaighofer.
anemet added a subscriber: Unknown Object (MLST).
hfinkel edited edge metadata.Jan 30 2015, 4:58 AM

I think it would be better to collect these into a struct describing vectorization thresholds.

I think it would be better to collect these into a struct describing vectorization thresholds.

Sure, I can do that. (I was going to wait and see how this shapes up with LoopDist as another client. The MemoryDepChecker would have to somehow be specialized further for the Vectorizer.)

  • Original Message -----

From: "Adam Nemet" <anemet@apple.com>
To: anemet@apple.com, aschwaighofer@apple.com, hfinkel@anl.gov
Cc: llvm-commits@cs.uiuc.edu
Sent: Friday, January 30, 2015 12:01:32 PM
Subject: Re: [PATCH] [LoopVectorize] Pass parameters explicitly to MemoryDepChecker

In http://reviews.llvm.org/D7284#115788, @hfinkel wrote:

I think it would be better to collect these into a struct
describing vectorization thresholds.

Sure, I can do that. (I was going to wait and see how this shapes up
with LoopDist as another client. The MemoryDepChecker would have to
somehow be specialized further for the Vectorizer.)

Understood; but I think you might as well do that now. We can always refactor things again later.

-Hal

http://reviews.llvm.org/D7284

EMAIL PREFERENCES

http://reviews.llvm.org/settings/panel/emailpreferences/
anemet updated this revision to Diff 19082.Jan 30 2015, 11:39 PM
anemet edited edge metadata.

Rebased and addressed Hal's comments

hfinkel accepted this revision.Jan 31 2015, 8:04 PM
hfinkel edited edge metadata.

LGTM.

lib/Transforms/Vectorize/LoopVectorize.cpp
722

MSVC2012 sometimes has problems with syntax like this, and you might need to construct by name if it complains -- the buildbots will tell you ;)

This revision is now accepted and ready to land.Jan 31 2015, 8:04 PM
anemet closed this revision.Feb 2 2015, 11:56 AM

r227754