This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Report extractelement as free in cost model
ClosedPublic

Authored by arsenm on Dec 1 2015, 9:12 AM.

Details

Reviewers
tstellarAMD
Summary

The cost for scalarized operations is computed as N * (scalar operation
cost + 1 extractelement + 1 insertelement). This partially fixes
inflating the cost of scalarized operations since every operation is
scalarized and free. I don't think we want any cost asociated with
scalarization, but for now insertelement is still counted. I'm not sure
if we should pretend that insertelement is also free, or add a way
to compute a custom scalarization cost.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 41525.Dec 1 2015, 9:12 AM
arsenm updated this revision to Diff 41526.
arsenm retitled this revision from to AMDGPU: Report extractelement as free in cost model.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.

Attach correct patch

tstellarAMD accepted this revision.Dec 1 2015, 10:49 AM
tstellarAMD edited edge metadata.

LGTM. Seems like a hook for scalarization cost may best though.

This revision is now accepted and ready to land.Dec 1 2015, 10:49 AM
arsenm closed this revision.Dec 1 2015, 11:11 AM

r254438