Page MenuHomePhabricator

[HIP][AMDGPU] Do not perform Promote Alloca optimization for GPU kernels with dynamic LDS usage.
Needs RevisionPublic

Authored by kpyzhov on Jun 22 2020, 6:22 PM.

Details

Summary

The "Promote Alloca" optimization tries to move some stack allocations to statically allocated LDS, so it adds new static LDS loads/stores to the kernel.
Mixed static/dynamic LDS is not correctly supported by the hip-clang yet, so adding static LDS load/stores to a kernel that already has dynamic LDS operations causes conflicts.
This patch disables Promote Alloca optimization for kernels that use dynamic LDS.

Diff Detail

Event Timeline

kpyzhov created this revision.Jun 22 2020, 6:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2020, 6:22 PM
arsenm requested changes to this revision.Jun 23 2020, 5:33 AM

Needs testcase

llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
740

I think this needs more clarification, since this does handle dynamic LDS as OpenCL uses it through a kernel argument.

This revision now requires changes to proceed.Jun 23 2020, 5:33 AM

inverse ping