diff --git a/llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst b/llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst --- a/llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst +++ b/llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst @@ -533,26 +533,6 @@ See :ref:`amdgpu-dwarf-memory-spaces`. -2.15 Define Augmentation Strings to Support Multiple Extensions ---------------------------------------------------------------- - -A ``DW_AT_LLVM_augmentation`` attribute is added to a compilation unit debugger -information entry to indicate that there is additional target architecture -specific information in the debugging information entries of that compilation -unit. This allows a consumer to know what extensions are present in the debugger -information entries as is possible with the augmentation string of other -sections. See . - -The format that should be used for an augmentation string is also recommended. -This allows a consumer to parse the string when it contains information from -multiple vendors. Augmentation strings occur in the ``DW_AT_LLVM_augmentation`` -attribute, in the lookup by name table, and in the CFI Common Information Entry -(CIE). - -See :ref:`amdgpu-dwarf-full-and-partial-compilation-unit-entries`, -:ref:`amdgpu-dwarf-name-index-section-header`, and -:ref:`amdgpu-dwarf-structure_of-call-frame-information`. - 2.16 Support Embedding Source Text for Online Compilation --------------------------------------------------------- @@ -775,7 +755,6 @@ Attribute Usage ============================ ==================================== ``DW_AT_LLVM_active_lane`` SIMT active lanes (see :ref:`amdgpu-dwarf-low-level-information`) - ``DW_AT_LLVM_augmentation`` Compilation unit augmentation string (see :ref:`amdgpu-dwarf-full-and-partial-compilation-unit-entries`) ``DW_AT_LLVM_lane_pc`` SIMT lane program location (see :ref:`amdgpu-dwarf-low-level-information`) ``DW_AT_LLVM_lanes`` SIMT lane count (see :ref:`amdgpu-dwarf-low-level-information`) ``DW_AT_LLVM_iterations`` Concurrent iteration count (see :ref:`amdgpu-dwarf-low-level-information`) @@ -3280,38 +3259,6 @@ The HIP language [:ref:`HIP `] can be supported by extending the C++ language. -.. note:: - - The following new attribute is added. - -1. A ``DW_TAG_compile_unit`` debugger information entry for a compilation unit - may have a ``DW_AT_LLVM_augmentation`` attribute, whose value is an - augmentation string. - - *The augmentation string allows producers to indicate that there is - additional vendor or target specific information in the debugging - information entries. For example, this might be information about the - version of vendor specific extensions that are being used.* - - If not present, or if the string is empty, then the compilation unit has no - augmentation string. - - The format for the augmentation string is: - - | ``[``\ *vendor*\ ``:v``\ *X*\ ``.``\ *Y*\ [\ ``:``\ *options*\ ]\ ``]``\ * - - Where *vendor* is the producer, ``vX.Y`` specifies the major X and minor Y - version number of the extensions used, and *options* is an optional string - providing additional information about the extensions. The version number - must conform to semantic versioning [:ref:`SEMVER `]. - The *options* string must not contain the "\ ``]``\ " character. - - For example: - - :: - - [abc:v0.0][def:v1.2:feature-a=on,feature-b=3] - A.3.3 Subroutine and Entry Point Entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -3717,9 +3664,9 @@ 3. ``DW_AT_LLVM_memory_space`` - A ``DW_AT_memory_space`` attribute with a constant value representing a source + A ``DW_AT_LLVM_memory_space`` attribute with a constant value representing a source language specific DWARF memory space (see 2.14 "Memory Spaces"). If omitted, - defaults to ``DW_MSPACE_none``. + defaults to ``DW_MSPACE_LLVM_none``. A.4.2 Common Block Entries @@ -3989,45 +3936,6 @@ or ``DW_OP_form_tls_address`` operation are included; otherwise, they are excluded. -A.6.1.1.4 Data Representation of the Name Index -############################################### - -.. _amdgpu-dwarf-name-index-section-header: - - -A.6.1.1.4.1 Section Header -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. note:: - - The following provides an addition to DWARF Version 5 section 6.1.1.4.1 item - 14 ``augmentation_string``. - -A null-terminated UTF-8 vendor specific augmentation string, which provides -additional information about the contents of this index. If provided, the -recommended format for augmentation string is: - - | ``[``\ *vendor*\ ``:v``\ *X*\ ``.``\ *Y*\ [\ ``:``\ *options*\ ]\ ``]``\ * - -Where *vendor* is the producer, ``vX.Y`` specifies the major X and minor Y -version number of the extensions used in the DWARF of the compilation unit, and -*options* is an optional string providing additional information about the -extensions. The version number must conform to semantic versioning [:ref:`SEMVER -`]. The *options* string must not contain the "\ ``]``\ " -character. - -For example: - - :: - - [abc:v0.0][def:v1.2:feature-a=on,feature-b=3] - -.. note:: - - This is different to the definition in DWARF Version 5 but is consistent with - the other augmentation strings and allows multiple vendor extensions to be - supported. - .. _amdgpu-dwarf-line-number-information: A.6.2 Line Number Information @@ -4263,68 +4171,31 @@ Would this be increased to 5 to reflect the changes in these extensions? -4. ``augmentation`` (sequence of UTF-8 characters) - - A null-terminated UTF-8 string that identifies the augmentation to this CIE - or to the FDEs that use it. If a reader encounters an augmentation string - that is unexpected, then only the following fields can be read: - - * CIE: length, CIE_id, version, augmentation - * FDE: length, CIE_pointer, initial_location, address_range - - If there is no augmentation, this value is a zero byte. - - *The augmentation string allows users to indicate that there is additional - vendor and target architecture specific information in the CIE or FDE which - is needed to virtually unwind a stack frame. For example, this might be - information about dynamically allocated data which needs to be freed on exit - from the routine.* - - *Because the* ``.debug_frame`` *section is useful independently of any* - ``.debug_info`` *section, the augmentation string always uses UTF-8 - encoding.* - - The recommended format for the augmentation string is: - - | ``[``\ *vendor*\ ``:v``\ *X*\ ``.``\ *Y*\ [\ ``:``\ *options*\ ]\ ``]``\ * - - Where *vendor* is the producer, ``vX.Y`` specifies the major X and minor Y - version number of the extensions used, and *options* is an optional string - providing additional information about the extensions. The version number - must conform to semantic versioning [:ref:`SEMVER `]. - The *options* string must not contain the "\ ``]``\ " character. - - For example: - - :: - - [abc:v0.0][def:v1.2:feature-a=on,feature-b=3] - -5. ``address_size`` (ubyte) +4. ``address_size`` (ubyte) The size of a target address in this CIE and any FDEs that use it, in bytes. If a compilation unit exists for this frame, its address size must match the address size here. -6. ``segment_selector_size`` (ubyte) +5. ``segment_selector_size`` (ubyte) The size of a segment selector in this CIE and any FDEs that use it, in bytes. -7. ``code_alignment_factor`` (unsigned LEB128) +6. ``code_alignment_factor`` (unsigned LEB128) A constant that is factored out of all advance location instructions (see :ref:`amdgpu-dwarf-row-creation-instructions`). The resulting value is ``(operand * code_alignment_factor)``. -8. ``data_alignment_factor`` (signed LEB128) +7. ``data_alignment_factor`` (signed LEB128) A constant that is factored out of certain offset instructions (see :ref:`amdgpu-dwarf-cfa-definition-instructions` and :ref:`amdgpu-dwarf-register-rule-instructions`). The resulting value is ``(operand * data_alignment_factor)``. -9. ``return_address_register`` (unsigned LEB128) +8. ``return_address_register`` (unsigned LEB128) An unsigned LEB128 constant that indicates which column in the rule table represents the return address of the subprogram. Note that this column might @@ -4334,7 +4205,7 @@ location of the caller frame. The program location of the top frame is the target architecture program counter value of the current thread. -10. ``initial_instructions`` (array of ubyte) +9. ``initial_instructions`` (array of ubyte) A sequence of rules that are interpreted to create the initial setting of each column in the table. @@ -4344,7 +4215,7 @@ compilation system authoring body may specify an alternate default value for any or all columns. -11. ``padding`` (array of ubyte) +10. ``padding`` (array of ubyte) Enough ``DW_CFA_nop`` instructions to make the size of this entry match the length value above. @@ -4746,14 +4617,13 @@ ================================== ====== =================================== Attribute Name Value Classes ================================== ====== =================================== - ``DW_AT_LLVM_active_lane`` 0x3e08 exprloc, loclist - ``DW_AT_LLVM_augmentation`` 0x3e09 string ``DW_AT_LLVM_lanes`` 0x3e0a constant ``DW_AT_LLVM_lane_pc`` 0x3e0b exprloc, loclist ``DW_AT_LLVM_vector_size`` 0x3e0c constant ``DW_AT_LLVM_iterations`` 0x3e0a constant, exprloc, loclist ``DW_AT_LLVM_address_space`` TBA constant ``DW_AT_LLVM_memory_space`` TBA constant + ``DW_AT_LLVM_active_lane`` TBA exprloc, loclist ================================== ====== =================================== .. _amdgpu-dwarf-classes-and-forms: @@ -5011,7 +4881,6 @@ ``DW_TAG_variable`` * ``DW_AT_LLVM_memory_space`` ``DW_TAG_formal_parameter`` * ``DW_AT_LLVM_memory_space`` ``DW_TAG_constant`` * ``DW_AT_LLVM_memory_space`` - ``DW_TAG_compile_unit`` * ``DW_AT_LLVM_augmentation`` ``DW_TAG_entry_point`` * ``DW_AT_LLVM_active_lane`` * ``DW_AT_LLVM_lane_pc`` * ``DW_AT_LLVM_lanes`` diff --git a/llvm/docs/AMDGPUUsage.rst b/llvm/docs/AMDGPUUsage.rst --- a/llvm/docs/AMDGPUUsage.rst +++ b/llvm/docs/AMDGPUUsage.rst @@ -2573,20 +2573,6 @@ variable is used to define the value of the ``DW_AT_LLVM_active_lane`` attribute. -``DW_AT_LLVM_augmentation`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For AMDGPU, the ``DW_AT_LLVM_augmentation`` attribute of a compilation unit -debugger information entry has the following value for the augmentation string: - -:: - - [amdgpu:v0.0] - -The "vX.Y" specifies the major X and minor Y version number of the AMDGPU -extensions used in the DWARF of the compilation unit. The version number -conforms to [SEMVER]_. - Call Frame Information ---------------------- @@ -2643,37 +2629,6 @@ See DWARF Version 5 section 6.1. -Lookup By Name Section Header -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -See DWARF Version 5 section 6.1.1.4.1 and :ref:`amdgpu-dwarf-lookup-by-name`. - -For AMDGPU the lookup by name section header table: - -``augmentation_string_size`` (uword) - - Set to the length of the ``augmentation_string`` value which is always a - multiple of 4. - -``augmentation_string`` (sequence of UTF-8 characters) - - Contains the following UTF-8 string null padded to a multiple of 4 bytes: - - :: - - [amdgpu:v0.0] - - The "vX.Y" specifies the major X and minor Y version number of the AMDGPU - extensions used in the DWARF of this index. The version number conforms to - [SEMVER]_. - - .. note:: - - This is different to the DWARF Version 5 definition that requires the first - 4 characters to be the vendor ID. But this is consistent with the other - augmentation strings and does allow multiple vendor contributions. However, - backwards compatibility may be more desirable. - Lookup By Address Section Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~