This is an archive of the discontinued LLVM Phabricator instance.

[amdgpu] Run SROA after loop unrolling.
ClosedPublic

Authored by hliao on Jul 21 2020, 10:55 AM.

Details

Summary
  • There are promotable allocas after loop unrolling.

Diff Detail

Event Timeline

hliao created this revision.Jul 21 2020, 10:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2020, 10:55 AM

I would expect the generic code to add this

Also could use a test that shows this helping

hliao added a comment.Jul 21 2020, 2:19 PM

I would expect the generic code to add this

Yeah, I also feel that way. But, let do it as a target-specific one first. I will study it with cpu2k3 or cpu2k6 benchmarks to learn whether how they are benefited.

A test could be nice.

hliao updated this revision to Diff 289246.Sep 1 2020, 12:12 PM

Add a simple enough test case.

hliao updated this revision to Diff 289248.Sep 1 2020, 12:18 PM

clean up.

rampitec added inline comments.Sep 1 2020, 12:28 PM
llvm/test/CodeGen/AMDGPU/extra-sroa-after-unroll.ll
10

You need to check something with a non-negative pattern.

hliao updated this revision to Diff 289255.Sep 1 2020, 12:40 PM

revise the test case

hliao marked an inline comment as done.Sep 1 2020, 12:40 PM
This comment was removed by hliao.
rampitec accepted this revision.Sep 1 2020, 12:54 PM

LGTM with a nit: please run opt -instnamer on the test before submission.

This revision is now accepted and ready to land.Sep 1 2020, 12:54 PM
This revision was landed with ongoing or failed builds.Sep 1 2020, 1:10 PM
This revision was automatically updated to reflect the committed changes.