Skip to content

Commit

Permalink
Revert "[amdgpu] Default to code object v3"
Browse files Browse the repository at this point in the history
This reverts commit 4b2e7d0.
Breaks check-clang, see https://reviews.llvm.org/D93258#2453600
  • Loading branch information
nico committed Dec 15, 2020
1 parent 38b4442 commit c9ede6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -2811,7 +2811,7 @@ def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver
HelpText<"Execution model (WebAssembly only)">;

def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group<m_Group>,
HelpText<"Specify code object ABI version. Defaults to 3. (AMDGPU only)">,
HelpText<"Specify code object ABI version. Defaults to 4. (AMDGPU only)">,
MetaVarName<"<version>">, Values<"2,3,4">;

def mcode_object_v3_legacy : Flag<["-"], "mcode-object-v3">, Group<m_Group>,
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ unsigned tools::getOrCheckAMDGPUCodeObjectVersion(
const Driver &D, const llvm::opt::ArgList &Args, bool Diagnose) {
const unsigned MinCodeObjVer = 2;
const unsigned MaxCodeObjVer = 4;
unsigned CodeObjVer = 3;
unsigned CodeObjVer = 4;

// Emit warnings for legacy options even if they are overridden.
if (Diagnose) {
Expand Down
14 changes: 7 additions & 7 deletions llvm/docs/AMDGPUUsage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -911,12 +911,12 @@ The AMDGPU backend uses the following ELF header:

* ``ELFABIVERSION_AMDGPU_HSA_V3`` is used to specify the version of AMD HSA
runtime ABI for code object V3. Specify using the Clang option
``-mcode-object-version=3``. This is the default code object
version if not specified.
``-mcode-object-version=3``.

* ``ELFABIVERSION_AMDGPU_HSA_V4`` is used to specify the version of AMD HSA
runtime ABI for code object V4. Specify using the Clang option
``-mcode-object-version=4``.
``-mcode-object-version=4``. This is the default code object
version if not specified.

* ``ELFABIVERSION_AMDGPU_PAL`` is used to specify the version of AMD PAL
runtime ABI.
Expand Down Expand Up @@ -2871,6 +2871,10 @@ non-AMD key names should be prefixed by "*vendor-name*.".
Code Object V3 Metadata
+++++++++++++++++++++++

.. warning::
Code object V3 is not the default code object version emitted by this version
of LLVM.

Code object V3 to V4 metadata is specified by the ``NT_AMDGPU_METADATA`` note
record (see :ref:`amdgpu-note-records-v3-v4`).

Expand Down Expand Up @@ -3275,10 +3279,6 @@ same *vendor-name*.
Code Object V4 Metadata
+++++++++++++++++++++++

.. warning::
Code object V4 is not the default code object version emitted by this version
of LLVM.

Code object V4 metadata is the same as
:ref:`amdgpu-amdhsa-code-object-metadata-v3` with the changes and additions
defined in table :ref:`amdgpu-amdhsa-code-object-metadata-map-table-v3`.
Expand Down

0 comments on commit c9ede6f

Please sign in to comment.