This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Break read2/write2 search range on a memory fence
ClosedPublic

Authored by arsenm on Apr 24 2020, 9:27 AM.

Details

Summary

This is to fix performance regressions introduced by
86c944d790728891801778b8d98c2c65a83f36a5.

The old search would collect all potentially mergeable instructions in
the entire block. In this case, the same address is written in
multiple places in the block on the other side of a fence. When sorted
by offset, the two unmergeable, identical addresses would be next to
each other and the merge would give up.

Break the search space when we encounter an instruction we won't be
able to merge across. This will keep the identical addresses in
different merge attempts.

This may also improve compile time by reducing the merge list size.

Diff Detail

Event Timeline

arsenm created this revision.Apr 24 2020, 9:27 AM
This revision is now accepted and ready to land.Apr 24 2020, 11:10 AM