This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] In the new waitcnt insertion pass, use getHeader instead of getTopBlock to find the loop header.
ClosedPublic

Authored by kanarayan on May 3 2017, 2:57 PM.

Diff Detail

Event Timeline

kanarayan created this revision.May 3 2017, 2:57 PM
arsenm added inline comments.May 3 2017, 3:18 PM
test/CodeGen/AMDGPU/waitcnt-looptest.ll
2

s/DEFAULT/GCN

27–30

Remove these

35

How is this function testing loops when it doesn't have any control flow?

39

Can you run instanter on this test?

85–87

Remove extra string attributes

90–105

Remove metadata

kanarayan updated this revision to Diff 97741.May 3 2017, 4:25 PM

Updated to the correct test with loop.

I have not removed the metadata but cleaned up others. How do you run the instanter?

kanarayan updated this revision to Diff 97910.May 4 2017, 9:33 PM
kanarayan marked 3 inline comments as done.

Run instnamer on the test file.

kanarayan marked 3 inline comments as done.May 5 2017, 11:23 AM
kanarayan added inline comments.
test/CodeGen/AMDGPU/waitcnt-looptest.ll
90–105

Does running instnamer cover this?

kanarayan marked an inline comment as done.
t-tye accepted this revision.May 5 2017, 12:09 PM

LGTM

This revision is now accepted and ready to land.May 5 2017, 12:09 PM
arsenm added inline comments.May 5 2017, 12:12 PM
test/CodeGen/AMDGPU/waitcnt-looptest.ll
90–105

No, the metadata needs to be manually removed

kanarayan updated this revision to Diff 98002.May 5 2017, 12:48 PM

Removed the opencl metadata manually and reran the instnamer.

arsenm added inline comments.May 5 2017, 12:53 PM
test/CodeGen/AMDGPU/waitcnt-looptest.ll
19

Can drop all of this metadata too

123

You can still drop the tbaa metadata

kanarayan updated this revision to Diff 98008.May 5 2017, 1:19 PM

Remove more of the metadata manually.

kanarayan marked 4 inline comments as done.May 5 2017, 1:19 PM
This revision was automatically updated to reflect the committed changes.