Page MenuHomePhabricator

[AMDGPU] Implement CFI for CSR spills
Needs ReviewPublic

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

Details

Summary

Introduce new SPILL pseudos to allow CFI to be generated for only CSR
spills, and to make ISA-instruction-level accurate information.

Other targets either generate slightly incorrect information or rely on
conventions for how spills are placed within the entry block. The
approach in this change produces larger unwind tables, with the
increased size being spent on additional DW_CFA_advance_location
instructions needed to describe the unwinding accurately.

Diff Detail

Unit TestsFailed

TimeTest
690 mswindows > Clang.OpenMP::critical_codegen.cpp
Script: -- : 'RUN: at line 1'; c:\ws\w16n2-1\llvm-project\premerge-checks\build\bin\clang.exe -cc1 -internal-isystem c:\ws\w16n2-1\llvm-project\premerge-checks\build\lib\clang\12.0.0\include -nostdsysteminc -verify -fopenmp -x c++ -emit-llvm C:\ws\w16n2-1\llvm-project\premerge-checks\clang\test\OpenMP\critical_codegen.cpp -fexceptions -fcxx-exceptions -o - | c:\ws\w16n2-1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w16n2-1\llvm-project\premerge-checks\clang\test\OpenMP\critical_codegen.cpp --check-prefixes=ALL,NORMAL
960 mswindows > LLVM.CodeGen/AMDGPU::wave32.ll
Script: -- : 'RUN: at line 1'; c:\ws\w16n2-1\llvm-project\premerge-checks\build\bin\llc.exe -march=amdgcn -mcpu=gfx1010 -mattr=+wavefrontsize32,-wavefrontsize64 -verify-machineinstrs < C:\ws\w16n2-1\llvm-project\premerge-checks\llvm\test\CodeGen\AMDGPU\wave32.ll | c:\ws\w16n2-1\llvm-project\premerge-checks\build\bin\filecheck.exe -check-prefixes=GCN,GFX1032 C:\ws\w16n2-1\llvm-project\premerge-checks\llvm\test\CodeGen\AMDGPU\wave32.ll

Event Timeline

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

git clang-format

Re-add a test that got lost in a rebase somewhere

Rebase and update get{S,V}GPRSpillSaveOpcode (SIInstrInfo.cpp) as
per https://reviews.llvm.org/rG46579471fd2b9c00ba982325f53f30192cc5797f

Rebase onto LLVM master