aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorPetar Avramovic <Petar.Avramovic@amd.com>2025-01-24 11:06:02 +0100
committerGitHub <noreply@github.com>2025-01-24 11:06:02 +0100
commitf8a56df36e39b01af667f2e7823d5c1d8bab73ee (patch)
treecdbdbd36af0ffe4b4153c2b734a0ac8f68479dec /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent3208801aec1867b83335418d84ee09b773ef5b2e (diff)
downloadllvm-f8a56df36e39b01af667f2e7823d5c1d8bab73ee.zip
llvm-f8a56df36e39b01af667f2e7823d5c1d8bab73ee.tar.gz
llvm-f8a56df36e39b01af667f2e7823d5c1d8bab73ee.tar.bz2
AMDGPU/GlobalISel: AMDGPURegBankSelect (#112863)
Assign register banks to virtual registers. Does not use generic RegBankSelect. After register bank selection all register operand of G_ instructions have LLT and register banks exclusively. If they had register class, reassign appropriate register bank. Assign register banks using machine uniformity analysis: Sgpr - uniform values and some lane masks Vgpr - divergent, non S1, values Vcc - divergent S1 values(lane masks) AMDGPURegBankSelect does not consider available instructions and, in some cases, G_ instructions with some register bank assignment can't be inst-selected. This is solved in RegBankLegalize. Exceptions when uniformity analysis does not work: S32/S64 lane masks: - need to end up with sgpr register class after instruction selection - In most cases Uniformity analysis declares them as uniform (forced by tablegen) resulting in sgpr S32/S64 reg bank - When Uniformity analysis declares them as divergent (some phis), use intrinsic lane mask analyzer to still assign sgpr register bank temporal divergence copy: - COPY to vgpr with implicit use of $exec inside of the cycle - this copy is declared as uniform by uniformity analysis - make sure that assigned bank is vgpr Note: uniformity analysis does not consider that registers with vgpr def are divergent (you can have uniform value in vgpr). - TODO: implicit use of $exec could be implemented as indicator that instruction is divergent
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions