[ReplaceConstant] Extract code for expanding users of constant (NFC)
authorNikita Popov <npopov@redhat.com>
Fri, 3 Mar 2023 15:07:43 +0000 (16:07 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 3 Mar 2023 15:09:06 +0000 (16:09 +0100)
commit576060fb41c2de536a24d5d421b1cd8942f20b64
tree2bf4f37eb0cfee394c18ed825dbd9f7c3f6f26ae
parent8d06a7098588a7375d727a3bf826b2aa2e8f75c1
[ReplaceConstant] Extract code for expanding users of constant (NFC)

AMDGPU implements some handy code for expanding all constexpr
users of LDS globals. Extract the core logic into ReplaceConstant,
so that it can be reused elsewhere.
llvm/include/llvm/IR/ReplaceConstant.h
llvm/lib/IR/ReplaceConstant.cpp
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp