[llvm] [AMDGPU] Restore SP from saved-FP or saved-BP (PR #124007)
Christudasan Devadasan via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 00:40:16 PST 2025
cdevadas wrote:
> I got confused by the fact that you're using swapped meaning of FP/BP. I was talking about FP in your terminology.
I see. In the first glance I thought you were talking about the need for BP when there is realignment and fixedObject present. So my initial comment was in that direction. I looked at it once again and realized you talked about variable-sized objects.
> BP is only really needed if you have both dynamic stack realignment and variable-sized objects.
There is no need to enable BP when there are variable-sized objects. Because we don't alter the stack-base and FP alone can restore SP. So, the condition `shouldRealignStack` is the only check needed to enable BP. And in my second commend, I mentioned the follow-up work to fix the SP adjustment to avoid the gap we currently introduce in the stack with dyn_realigment case.
https://github.com/llvm/llvm-project/pull/124007
More information about the llvm-commits
mailing list