Page MenuHomePhabricator

[AMDGPU] Implement CFI for non-kernel functions
Needs ReviewPublic

Authored by scott.linder on Mar 26 2020, 12:21 PM.

Details

Summary

This does not implement CSR spills other than those AMDGPU handles
during PEI. The remaining spills are handled in a subsequent patch.

Diff Detail

Event Timeline

scott.linder created this revision.Mar 26 2020, 12:21 PM

git clang-format

arsenm added inline comments.Mar 26 2020, 1:42 PM
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
845

Register

858

Double cast

871

MCPhysReg?

1246

Register

llvm/lib/Target/AMDGPU/SIFrameLowering.h
88

s/unsigned/Register

Rebase and address feedback.

scott.linder edited the summary of this revision. (Show Details)
scott.linder added a reviewer: cdevadas.
scott.linder added a subscriber: cdevadas.

Rebase, generalize the previously hard-coded list of caller-saved registers
with help from @cdevadas, and emit CFI for the new case where we spill the FP
to VMEM.

cdevadas added inline comments.May 13 2020, 6:28 AM
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
27

I think it is good to move getAllSGPRs and getAllVGPRs into SIRegisterInfo.cpp.
There is another function getAllVGPR32 which does the same thing as getAllVGPRs.
We can unify these instances.

scott.linder marked an inline comment as done.
cdevadas added inline comments.May 14 2020, 9:06 AM
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
1691

Can you write a small description of why the FIXME?

Rebase and emit CFI for Base pointer

Rebase onto LLVM master

Not my area of expertise but looks fine if the comments from others are addressed.

Rebase onto LLVM master and address feedback

Rebase onto LLVM trunk.