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

Repository
rL LLVM

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
1 ↗(On Diff #97732)

s/DEFAULT/GCN

26–29 ↗(On Diff #97732)

Remove these

34 ↗(On Diff #97732)

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

38 ↗(On Diff #97732)

Can you run instanter on this test?

84–86 ↗(On Diff #97732)

Remove extra string attributes

89–104 ↗(On Diff #97732)

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
89–104 ↗(On Diff #97732)

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
89–104 ↗(On Diff #97732)

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
18 ↗(On Diff #98002)

Can drop all of this metadata too

122 ↗(On Diff #98002)

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.