This is an archive of the discontinued LLVM Phabricator instance.

Provide target callback to check if vector to scalar load/store widening is beneficial
AbandonedPublic

Authored by rampitec on May 22 2014, 12:01 AM.

Details

Reviewers
nadav
arsenm
Summary

LegalizeVectorTypes.cpp tries to widen loads and stores if possible, so that a load or store of v2i32 would become an operation with a single i64 for example. That is not beneficial in all cases. For example for a GPU supporting 3-element vector operations that will be more efficient to issue a single load of three 32 bit values than two distinct loads of 64 and 32 bit size.

The patch is to provide backend a way to tell if such transformation is desirable. The callback takes original operation width, a widened width and a MemSDNode to check if that is a store or load and its address space.

Diff Detail

Event Timeline

rampitec updated this revision to Diff 9679.May 22 2014, 12:01 AM
rampitec retitled this revision from to Provide target callback to check if vector to scalar load/store widening is beneficial.
rampitec updated this object.
rampitec edited the test plan for this revision. (Show Details)
rampitec added a reviewer: arsenm.
rampitec added a subscriber: Unknown Object (MLST).
arsenm edited edge metadata.Jun 11 2014, 12:30 PM

LGTM, but somebody else should look at this as well

arsenm resigned from this revision.Aug 3 2017, 4:56 PM
rampitec abandoned this revision.Apr 15 2021, 2:21 PM