This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Improve clobbering checks in the kernel argument promotion
ClosedPublic

Authored by rampitec on Feb 10 2022, 1:46 PM.

Details

Summary

Use same MSSA clobbering checks as in the AMDGPUAnnotateUniformValues.
Kernel argument promotion needs exactly the same information so factor
out utility function isClobberedInFunction.

Diff Detail

Event Timeline

rampitec created this revision.Feb 10 2022, 1:46 PM
rampitec requested review of this revision.Feb 10 2022, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2022, 1:46 PM
Herald added a subscriber: wdng. · View Herald Transcript
vpykhtin added inline comments.Feb 10 2022, 2:10 PM
llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp
34

This is usefull routine outside of the eclosing function, I would move it on the file scope and replace Load argument with its pointer, I don't see other uses of Load there.

rampitec updated this revision to Diff 407685.Feb 10 2022, 2:28 PM
rampitec marked an inline comment as done.

Factored out isReallyAClobber().

vpykhtin accepted this revision.Feb 10 2022, 2:32 PM

LGTM.

This revision is now accepted and ready to land.Feb 10 2022, 2:32 PM
vpykhtin added inline comments.Feb 10 2022, 2:35 PM
llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp
29

Nit: move the debug output back to isClobberedInFunction

rampitec updated this revision to Diff 407690.Feb 10 2022, 2:39 PM
rampitec marked an inline comment as done.

Moved debug output.

This revision was landed with ongoing or failed builds.Feb 10 2022, 2:52 PM
This revision was automatically updated to reflect the committed changes.