GlobalISel: Split ValueHandler into assignment and emission classes
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 4 May 2021 22:12:38 +0000 (18:12 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 11 May 2021 23:50:12 +0000 (19:50 -0400)
commit24e2e5df0e7eb017c64142c1f5899146fa52abba
tree4be6440b620c627820018edc2f794f3832dc3a39
parent2bdfcf0cac148ada8d3ec36f551c45efb604ac49
GlobalISel: Split ValueHandler into assignment and emission classes

Currently the ValueHandler handles both selecting the type and
location for arguments, as well as inserting instructions needed to
handle them. Split this so that the determination of the argument
handling is independent of the function state. Currently the checks
for tail call compatibility do not follow the full assignment logic,
so it misses cases where arguments require nontrivial legalization.

This should help avoid targets ending up in a buggy state where the
argument evaluation may change in different contexts.
llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
llvm/lib/Target/ARM/ARMCallLowering.cpp
llvm/lib/Target/X86/X86CallLowering.cpp
llvm/test/CodeGen/AArch64/GlobalISel/call-translator-tail-call.ll