This is an archive of the discontinued LLVM Phabricator instance.

[LoopAccesses] Make VectorizerParams global
ClosedPublic

Authored by anemet on Feb 16 2015, 2:19 PM.

Details

Summary

As LAA is becoming a pass, we can no longer pass the params to its
constructor. This changes the command line flags to have external
storage. These can now be accessed both from LV and LAA.

This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.

Diff Detail

Event Timeline

anemet updated this revision to Diff 20049.Feb 16 2015, 2:19 PM
anemet retitled this revision from to [LoopAccesses] Make VectorizerParams global.
anemet updated this object.
anemet edited the test plan for this revision. (Show Details)
anemet added reviewers: hfinkel, aschwaighofer, nadav.
anemet added a subscriber: Unknown Object (MLST).
hfinkel accepted this revision.Feb 16 2015, 4:09 PM
hfinkel edited edge metadata.

Aside from the placement issue noted below, LGTM.

include/llvm/Transforms/Utils/VectorUtils.h
205

I'd prefer you leave this in include/llvm/Analysis/LoopAccessAnalysis.h, it does not really fit with the theme of this file (which is transformation-independent utilities dealing with vector intrinsics, etc.). Leaving it in LAA.h puts it near its user, which I like better.

This revision is now accepted and ready to land.Feb 16 2015, 4:09 PM
anemet added inline comments.Feb 16 2015, 4:16 PM
include/llvm/Transforms/Utils/VectorUtils.h
205

Sure thing.

anemet added inline comments.Feb 17 2015, 10:21 AM
include/llvm/Transforms/Utils/VectorUtils.h
205

Hal, quick question. Do you have a preference whether you want to keep VectorizerParams local to LoopAccessInfo or move it to the top level? In order to access the static fields, you'd now have to write the lengthy:

LoopAccessInfo::VectorizerParams::VectorizationFactor

anemet closed this revision.Mar 1 2015, 9:40 PM

r229890