This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Look through bundles for existing waitcnts
ClosedPublic

Authored by arsenm on Jul 2 2019, 8:31 AM.

Details

Reviewers
rampitec
kerbowa
Summary

These aren't produced now, but will be in a future patch.

Diff Detail

Event Timeline

arsenm created this revision.Jul 2 2019, 8:31 AM

What about the possibility of inserting waitcnt into bundles?

lib/Target/AMDGPU/SIInsertWaitcnts.cpp
1360–1361

Can we just skip BUNDLE instructions.

arsenm updated this revision to Diff 207582.Jul 2 2019, 9:54 AM

Add tests for inter and cross bundle waitcnts. Somewhat surprisingly, works as expected

arsenm marked an inline comment as done.Jul 2 2019, 9:55 AM
arsenm added inline comments.
lib/Target/AMDGPU/SIInsertWaitcnts.cpp
1360–1361

That's the opposite of the point. The point is to find the waitcnt inside the bundle

LGTM but I will wait for Stas.

lib/Target/AMDGPU/SIInsertWaitcnts.cpp
1360–1361

I mean the actual BUNDLE instruction itself, but it's not actually important.

What will happen if we decide to insert wait in the middle of the bundle? Before this change it was impossible.

What will happen if we decide to insert wait in the middle of the bundle? Before this change it was impossible.

That's tested in insert_in_bundle. It seems to work as expected, and puts a waitcnt inside the bundle

rampitec accepted this revision.Jul 2 2019, 11:49 AM

LGTM.

This revision is now accepted and ready to land.Jul 2 2019, 11:49 AM
arsenm closed this revision.Jul 2 2019, 5:30 PM

r364983