HomePhabricator

[AMDGPU] Add gfx602, gfx705, gfx805 targets

Authored by tpr on Oct 6 2020, 10:23 AM.

Description

[AMDGPU] Add gfx602, gfx705, gfx805 targets

At AMD, in an internal audit of our code, we found some corner cases
where we were not quite differentiating targets enough for some old
hardware. This commit is part of fixing that by adding three new
targets:

  • The "Oland" and "Hainan" variants of gfx601 are now split out into gfx602. LLPC (in the GPUOpen driver) and other front-ends could use that to avoid using the shaderZExport workaround on gfx602.
  • One variant of gfx703 is now split out into gfx705. LLPC and other front-ends could use that to avoid using the shaderSpiCsRegAllocFragmentation workaround on gfx705.
  • The "TongaPro" variant of gfx802 is now split out into gfx805. TongaPro has a faster 64-bit shift than its former friends in gfx802, and a subtarget feature could be set up for that to take advantage of it. This commit does not make that change; it just adds the target.

V2: Add clang changes. Put TargetParser list in order.
V3: AMDGCNGPUs table in TargetParser.cpp needs to be in GPUKind order,

so fix the GPUKind order.

Differential Revision: https://reviews.llvm.org/D88916

Change-Id: Ia901a7157eb2f73ccd9f25dbacec38427312377d

Details

Event Timeline

t-tye added a subscriber: t-tye.Oct 13 2020, 4:23 PM
t-tye added inline comments.
/llvm/docs/AMDGPUUsage.rst
804

Add:

``EF_AMDGPU_MACH_AMDGCN_GFX705``  0x027      ``gfx705``
822–826

Change to:

*reserved*                        0x038      Reserved.
``EF_AMDGPU_MACH_AMDGCN_GFX602``  0x039      ``gfx602``
``EF_AMDGPU_MACH_AMDGCN_GFX805``  0x03a      ``gfx805``
/llvm/include/llvm/BinaryFormat/ELF.h
695

0x27

700

0x03a