1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

141 Commits

Author SHA1 Message Date
Tim Renouf
2a63696860 [AMDGPU] Add gfx90c target
This differentiates the Ryzen 4000/4300/4500/4700 series APUs that were
previously included in gfx909.

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

Change-Id: Ia901a7157eb2f73ccd9f25dbacec38427312377d
2020-11-03 16:27:43 +00:00
Tony
da9521a27f [NFC][AMDGPU] Restructure the AMDGPU memory model description
Separate the AMDGPU memory model description into separate sections
for each architecture.

Differential Revision: https://reviews.llvm.org/D90548
2020-11-02 21:32:20 +00:00
Tony
2aebcb4378 [NFC][AMDGPU] Minor cleanup to AMDGPU memory model table
Differential Revision: https://reviews.llvm.org/D90509
2020-10-30 22:50:22 +00:00
Scott Linder
3d87386ebf [NFC][AMDGPU] Resize Memory Model columns in AMDGPUUsage.rst
Make all of the "AMDGPU Machine Code GFX*" columns in the Memory Model
table a consistent width of 32-characters.

Best viewed with something like --word-diff

Differential Revision: https://reviews.llvm.org/D89977
2020-10-29 23:07:03 +00:00
Scott Linder
e2577bcfdc [AMDGPU] Update Memory Model in AMDGPUUsage.rst
Mostly NFC, but some changes are "bug fixes" rather than just e.g.
formatting changes or typo corrections.

- Fix typo "competing" -> "completing".
- Document why waintcnt is added to stores and not loads for
  sequentially consistent ordering.
- Lowercase some mentions of `buffer_gl{0,1}_inv`.
- Make mentions of `*cnt(0)` consistently include the `(0)` count.
- Remove some mentions of instructions for incorrect address spaces. For
  example, remove mention of `flat_load` from
  `load atomic acquire workgroup global`.
- Re-flow some text to get all the target columns to fit in a
  32-character wide column. Makes a future NFC patch to make these columns
  both 32-character wide more straightforward.

Modified cherry-pick of patch by Tony Tye

Reviewed By: t-tye

Differential Revision: https://reviews.llvm.org/D89596
2020-10-29 23:07:03 +00:00
Tony
4b2fceb859 [AMDGPU] Update AMD GPU documentation
- AMDGPUUsage.rst: Correct AMD GPU DWARF address space table address
  sizes which are in bits and not bytes.

- clang/.../Options.td: Improve description of AMD GPU options.

- Re-generate ClangComamndLineReference.rst from clang/.../Options.td .

Differential Revision: https://reviews.llvm.org/D90364
2020-10-29 20:12:47 +00:00
Tony
a12729cc2b [AMDGPU] Cleanup AMDGPUUsage.rst
- Layout and typo improvements.
- Add memory spaces section.
- reStructure syntax fixes.

Differential Revision: https://reviews.llvm.org/D90002
2020-10-24 06:21:27 +00:00
Stanislav Mekhanoshin
9c088650a5 [AMDGPU] Fix gfx1032 description in AMDGPUUsage.rst. NFC.
Differential Revision: https://reviews.llvm.org/D89565
2020-10-16 13:29:20 -07:00
Stanislav Mekhanoshin
86aeb69232 [AMDGPU] gfx1032 target
Differential Revision: https://reviews.llvm.org/D89487
2020-10-15 12:41:18 -07:00
Konstantin Zhuravlyov
5f87057393 AMDGPU: Update AMDHSA code object version handling
Differential Revision: https://reviews.llvm.org/D89076
2020-10-14 13:04:27 -04:00
Tony
c338b755d2 [AMDGPU] Correct processor names for gfx1010 and gfx1011
Change-Id: Ie409f86876b0437d0b0405aff42872963708d926

Differential Revision: https://reviews.llvm.org/D89259
2020-10-12 20:16:12 +00:00
Tim Renouf
13991476f1 [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
2020-10-10 17:22:22 +01:00
Tony
06c11c6b12 [AMDGPU] Correct gfx1031 XNACK setting documentation
- gfx1031 does not support XNACK.

Differential Revision: https://reviews.llvm.org/D87198
2020-09-09 19:43:02 +00:00
Tony
67e779a7ea [AMDGPU] Correct DWARF register defintions
- Rename AMDGPU SCC DWARF register to STATUS since the scalar
  condition code is a bit within the STATUS register.

- Correct bit size of the VCC_64 register to 64 which is the size in
  wave64 mode.

Differential Revision: https://reviews.llvm.org/D86259
2020-08-20 01:15:04 +00:00
madhur13490
cc99379745 [NFC] Fix typo in AMDGPU doc
Reviewed By: t-tye, arsenm

Differential Revision: https://reviews.llvm.org/D86206
2020-08-19 14:33:26 +00:00
Sebastian Neubauer
f6c931c6b8 [AMDGPU] Fix typo. NFC 2020-08-13 10:41:48 +02:00
Kazu Hirata
fc9284d5ff [docs] Fix typos 2020-08-09 19:31:49 -07:00
Tony
9357771d35 [AMDGPU] Correct missing sram-ecc target feature for gfx906
Differential Revision: https://reviews.llvm.org/D85476
2020-08-06 22:12:25 +00:00
Stanislav Mekhanoshin
d688e1d62e [AMDGPU] gfx1031 target
Differential Revision: https://reviews.llvm.org/D85337
2020-08-05 12:36:26 -07:00
Tony
57dd67ea2c [AMDGPU] DWARF proposal changes
- Clarify that these are extensions to DWARF 5 and not as yet a
  proposal.

Reviewed By: scott.linder

Differential Revision: https://reviews.llvm.org/D70523
2020-07-30 05:07:09 +00:00
Tony
a3714ce03c [AMDGPU] DWARF proposal changes for expression context
- Clarify what context is used in DWARF expression evaluation.

- Define location descriptions to fully resolve the context and so
  include the context in their result.

- As a consequence of location descriptions being fully resoved,
  change address spaces so only a swizzled and unswizzled private
  address space is defined. The lane is now part of the location
  description context.

- Clarify how call frame information is used to fully resolve
  expressions that specify registers.

Reviewed By: scott.linder

Differential Revision: https://reviews.llvm.org/D70523
2020-07-30 01:59:22 +00:00
Matt Arsenault
e36234a636 AMDGPU: Remove .value_type from kernel metadata
This doesn't appear used for anything, and is emitted incorrectly
based on the description. This also depends on the IR type, and
pointee element type.
2020-07-10 18:16:31 -04:00
Tony
5d6f19018d [AMDGPU] Correct AMDGPUUsage.rst DW_AT_LLVM_lane_pc example
- Correct typo of DW_OP_xaddr to DW_OP_addrx in AMDGPUUsage.rst for
  DW_AT_LLVM_lane_pc example.

Change-Id: I1b0ee2b24362a0240388e4c2f044c1d4883509b9
2020-07-01 08:23:15 +00:00
Tony
61b6382a7a [AMDGPU] Define DWARF encoding for condition code registers
Summary:
- Define DWARF register numbers for vector and scalar condition codes.
- Document intended purpose of reserved DWARF register numbers.

Reviewers: yaxunl, kzhuravl, arsenm, rampitec, b-sumner

Subscribers: jvesely, wdng, nhaehnle, aprantl, dstuttard, tpr, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82519
2020-06-26 17:53:55 -04:00
Tony
21efe1c804 [AMDGPU] Update AMD GPU processor information
Summary:
- Add product names for some processors.
- Correct XNACK support for a processor.

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82348
2020-06-23 18:47:56 -04:00
Matt Arsenault
1529ca40cf AMDGPU: Update private null pointer value in documentation
Private pointers used to workaround IR semantics by artifically
reserving an object at offset 0 so no user object would be allocated
there. Since alloca now uses a non-0 address space, that workaround is
unnecssary and 0 can be treated as a valid pointer.
2020-06-18 17:27:19 -04:00
Stanislav Mekhanoshin
9363e58d6d [AMDGPU] Add gfx1030 target
Differential Revision: https://reviews.llvm.org/D81886
2020-06-15 16:18:05 -07:00
madhur13490
1759a48fb7 Fix a typo in AMDGPU docs
Reviewers: t-tye, arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81247
2020-06-05 13:30:17 +00:00
Tony
cb4d236766 [AMDGPU] Add loaded code object path URI definition to AMDGPUUsage
Differential Revision: https://reviews.llvm.org/D80407
2020-05-29 19:52:52 -04:00
Tony
b57b09ff4a [AMDGPU] Correct formatting typos in documentation
Summary:
- Correct missing space in some "note" and "TODO" directives in
  AMDGPUUsage.rst
- Correct warning for heading underline being too short in
  BitCodeFormat.rst

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80407
2020-05-21 20:36:46 -04:00
Jinsong Ji
efd35f1fad [docs] Fix buildbot failures
Buildbot has been failing since
http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/44711

This patch fix the minor issues that cause warnings.
2020-05-21 22:07:33 +00:00
Christudasan Devadasan
52dc890b04 [AMDGPU] Enable base pointer.
When the callee requires a dynamic stack realignment,
it is not possible to correcty access the incoming
stack arguments using the stack pointer. We reserve a
base pointer in such cases to access the function arguments
inside the callee. The base pointer will hold the incoming
stack pointer value before any kind of delta added to it.

Reviewed By: arsenm, scott.linder

Differential Revision: https://reviews.llvm.org/D78811
2020-05-17 16:13:55 +05:30
Christudasan Devadasan
8553d88165 [AMDGPU] Introduce more scratch registers in the ABI.
The AMDGPU target has a convention that defined all VGPRs
(execept the initial 32 argument registers) as callee-saved.
This convention is not efficient always, esp. when the callee
requiring more registers, ended up emitting a large number of
spills, even though its caller requires only a few.

This patch revises the ABI by introducing more scratch registers
that a callee can freely use.
The 256 vgpr registers now become:
  32 argument registers
  112 scratch registers and
  112 callee saved registers.
The scratch registers and the CSRs are intermixed at regular
intervals (a split boundary of 8) to obtain a better occupancy.

Reviewers: arsenm, t-tye, rampitec, b-sumner, mjbedy, tpr

Reviewed By: arsenm, t-tye

Differential Revision: https://reviews.llvm.org/D76356
2020-05-05 23:02:58 +05:30
Kazuaki Ishizaki
7ce19394dc [llvm] NFC: Fix trivial typo in rst and td files
Differential Revision: https://reviews.llvm.org/D77469
2020-04-23 14:26:32 +09:00
Tony
e5640d8442 [AMDGPU] Move DWARF proposal to separate file
- Move DWARF proposal for heterogeneous debugging to a separate file.
- Add references.

Differential Revision: https://reviews.llvm.org/D70523
2020-04-15 17:19:39 -04:00
Tony
403c4f0ca8 [AMDGPU] Update DWARF proposal
- Unify the sections on DWARF expression and location lists.

- Allow a location description to have one or more single location
  descriptions.

- Define context of DWARF expression that includes an initial
  stack. Allow initial stack to be used when evaluating location list
  expression with overlapping PC ranges.

- Reorganize the DWARF proposal in AMDGPUUsage so suitable for
  submission to the DWARF site.

- Replace CFI instruction DW_CFA_LLVM_def_cfa_aspace with
  DW_CFA_def_aspace_cfa and DW_CFA_def_aspace_cfa_sf. This is to avoid
  the problem that DW_CFA_def_cfa and DW_CFA_def_cfa_sf cannot use a
  register that is not the size of an address in the CFA address
  space.

- Clarify DWARF address class and DWARF address space. Define language
  values for DWARF address classes and specify how they are used by
  some common source languages.

- Define rules for accessing registers and derefencing memory when the
  type size and register size or byte size operand do not match.

- Numerous cleanups for consistency.

Differential Revision: https://reviews.llvm.org/D70523
2020-04-14 20:05:15 -04:00
Sylvestre Ledru
8598ae94d7 Doc: Links should use https 2020-03-22 22:49:33 +01:00
Scott Linder
85bcde4aea [AMDGPU] Move frame pointer from s34 to s33
Remove the gap left between the stack pointer (s32) and frame pointer
(s34) now that the scratch wave offset is no longer a part of the
calling convention ABI.

Update llvm/docs/AMDGPUUsage.rst to reflect the change.

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75657
2020-03-19 15:35:16 -04:00
Scott Linder
a70016c8d5 [AMDGPU] Add Scratch Wave Offset to Scratch Buffer Descriptor in entry functions
Add the scratch wave offset to the scratch buffer descriptor (SRSrc) in
the entry function prologue. This allows us to removes the scratch wave
offset register from the calling convention ABI.

As part of this change, allow the use of an inline constant zero for the
SOffset of MUBUF instructions accessing the stack in entry functions
when a frame pointer is not requested/required. Entry functions with
calls still need to set up the calling convention ABI stack pointer
register, and reference it in order to address arguments of called
functions. The ABI stack pointer register remains unswizzled, but is now
wave-relative instead of queue-relative.

Non-entry functions also use an inline constant zero SOffset for
wave-relative scratch access, but continue to use the stack and frame
pointers as before. When the stack or frame pointer is converted to a
swizzled offset it is now scaled directly, as the scratch wave offset no
longer needs to be subtracted first.

Update llvm/docs/AMDGPUUsage.rst to reflect these changes to the calling
convention.

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75138
2020-03-19 15:35:16 -04:00
Tony
491ebe17c8 [AMDGPU] AMDGPUUsage define call convention ABI
Reviewers: scott.linder, arsenm, b-sumner

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74861
2020-02-19 15:56:19 -05:00
Tony
f119c347fa [AMDGPU] Update AMDGPUUsage with DWARF proposal
Summary:
- Add AMDGPU DWARF proposal.
- Add references for gfx10 ISA and SemVer.

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, aprantl, dstuttard, tpr, jfb, dmgreen, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70523
2020-02-19 15:30:53 -05:00
Dmitry Preobrazhensky
4132e08676 [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.
Summary of changes:
- updated description of gfx906 and gfx908;
- added description of gfx1011 and gfx1012 subtargets.
2020-02-07 16:23:46 +03:00
Hans Wennborg
c7ebd85525 [docs] NFC: Fix typos in documents
"the the" -> "the"
"an" -> "a"

Patch by Kazuaki Ishizaki <ishizaki@jp.ibm.com>!

Differential revision: https://reviews.llvm.org/D72091
2020-01-07 16:06:14 +01:00
Dmitry Preobrazhensky
d3bcd94780 [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.
Summary of changes:
- added description of GFX9 subtargets:
  - gfx900;
  - gfx902;
  - gfx904;
  - gfx906;
  - gfx908;
  - gfx909.
2019-12-25 17:51:53 +03:00
Tony
39015f8b4f [AMDGPU] AMDGPUUsage clarify address space information and other typo and formatting fixes
Summary:
- Clarify AMDGPU address spaces.
- Correct path to AMDGPU backend since now in the mono-repo.
- Fix numerous text style and typo issues.
- Correct reStructure text formatting warnings.
- Made reStructure directive usage more consistent.
- Add references for gfx10 ISA specification.

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71392
2019-12-12 14:51:27 -05:00
Nico Weber
61fdc5dbdf Fix a few doc typos, to cycle bots. 2019-12-08 18:51:48 -05:00
Sameer Sahasrabuddhe
0ca25cfe2f [AMDGPU] add support for hostcall buffer pointer as hidden kernel argument
Hostcall is a service that allows a kernel to submit requests to the
host using shared buffers, and block until a response is
received. This will eventually replace the shared buffer currently
used for printf, and repurposes the same hidden kernel argument. This
change introduces a new ValueKind in the HSA metadata to represent the
hostcall buffer.

Differential Revision: https://reviews.llvm.org/D70038
2019-11-20 15:53:55 +05:30
Stanislav Mekhanoshin
a7f5d761c5 [AMDGPU] gfx908 target
Differential Revision: https://reviews.llvm.org/D64429

llvm-svn: 365525
2019-07-09 18:10:06 +00:00
Dmitry Preobrazhensky
e9cc90bf60 [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.
Corrected a typo.

llvm-svn: 365353
2019-07-08 17:09:09 +00:00
Dmitry Preobrazhensky
d2c3f2c3bb [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description.
Summary of changes:
- added description of GFX10;
- added description of operands sccz, vccz, lds_direct, etc;
- minor bugfixing and improvements.

llvm-svn: 365347
2019-07-08 16:50:11 +00:00