This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Avoid processing functions in amdgpu-propagate-attributes pass for shaders
ClosedPublic

Authored by piotr on Sep 17 2021, 5:48 AM.

Details

Summary

The pass amdgpu-propagate-attributes ("Early/Late propagate attributes
from kernels to functions") is currently run also for shaders, where
it does nothing. Modify the check so the pass only processes functions
for kernels.

Diff Detail

Event Timeline

piotr created this revision.Sep 17 2021, 5:48 AM
piotr requested review of this revision.Sep 17 2021, 5:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 17 2021, 5:48 AM
piotr retitled this revision from [AMDGPU] Avoid calling amdgpu-propagate-attributes pass for shaders to [AMDGPU] Avoid processing functions in amdgpu-propagate-attributes pass for shaders.Sep 17 2021, 5:54 AM

Needs test (although I am working towards removing this pass)

piotr added a comment.Sep 20 2021, 7:53 AM

I was thinking about this, but not sure what the test would demonstrate, as the patch just limits the number of cases for which this pass works. With this patch, there are no test changes in the existing set of tests, as expected.

This patch causes an early exit for calling conventions where isShader() is true. We run early inlining in these cases.

arsenm accepted this revision.Sep 21 2021, 8:08 AM

I was thinking about this, but not sure what the test would demonstrate, as the patch just limits the number of cases for which this pass works. With this patch, there are no test changes in the existing set of tests, as expected.

This patch causes an early exit for calling conventions where isShader() is true. We run early inlining in these cases.

It would show not touching the attributes on the function

This revision is now accepted and ready to land.Sep 21 2021, 8:08 AM