[PATCH] D81364: AMDGPU: Correct prolog SP initialization logic

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 14:50:04 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1295
+
+bool SIFrameLowering::requiresStackPointerReference(const MachineFunction &MF) const {
+  // Callable functions always require a stack pointer reference.
----------------
scott.linder wrote:
> How does this differ from `frameRequiresSP`?
This is split mostly because of the distinctive handling of functions and kernels in hasFP. hasFP and requiresStackPointerReferences are almost the same, except the kernel case is a bit more specific since there's never a real reason to setup FP since it's known 0 (e.g. we never realign the kernel stack). requiresStackPointerReference is essentially hasFP for kernels, and frameRequiresSP is common to kernels and functions.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81364/new/

https://reviews.llvm.org/D81364



More information about the llvm-commits mailing list