[AMDGPU] Init scratch only if necessary
authorSebastian Neubauer <sebastian.neubauer@amd.com>
Wed, 14 Jul 2021 08:03:54 +0000 (10:03 +0200)
committerSebastian Neubauer <sebastian.neubauer@amd.com>
Wed, 14 Jul 2021 08:45:22 +0000 (10:45 +0200)
commit4359b870b187dca39573728002ce6bc0ffd4d469
tree2022d9fc691a23662888caf68ca0d7eec43c6266
parenta12e551882b68fe36856b0e66a5699fcf124aac5
[AMDGPU] Init scratch only if necessary

If no scratch or flat instructions are used, we do not need to
initialize the flat scratch hardware register.

Differential Revision: https://reviews.llvm.org/D105920
15 files changed:
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-uniform.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/flat-scratch-init.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/non-entry-alloca.ll
llvm/test/CodeGen/AMDGPU/call-constant.ll
llvm/test/CodeGen/AMDGPU/cc-update.ll
llvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll
llvm/test/CodeGen/AMDGPU/flat-scratch-init.ll
llvm/test/CodeGen/AMDGPU/large-alloca-compute.ll
llvm/test/CodeGen/AMDGPU/local-stack-alloc-block-sp-reference.ll
llvm/test/CodeGen/AMDGPU/memory_clause.ll
llvm/test/CodeGen/AMDGPU/non-entry-alloca.ll
llvm/test/CodeGen/AMDGPU/spill-offset-calculation.ll
llvm/test/CodeGen/AMDGPU/stack-realign-kernel.ll