Skip to content

Commit 0a3258f

Browse files
committed
[AMDGPU][NFC] Update DWARF extension for locations on the stack
- Improve extension description. - Rename "What is DWARF?" section to better reflect what it is describing. Reviewed By: kzhuravl Differential Revision: https://reviews.llvm.org/D116077
1 parent 76b7d73 commit 0a3258f

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

llvm/docs/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- [Extension](#extension)
44
- [Heterogeneous Computing Devices](#heterogeneous-computing-devices)
55
- [DWARF 5](#dwarf-5)
6-
- [What is DWARF?](#what-is-dwarf)
6+
- [How DWARF Maps Source Language To Hardware](#how-dwarf-maps-source-language-to-hardware)
77
- [Examples](#examples)
88
- [Dynamic Array Size](#dynamic-array-size)
99
- [Variable Location in Register](#variable-location-in-register)
@@ -29,15 +29,22 @@
2929

3030
# Extension
3131

32-
This extension is to generalize the DWARF expression evaluation model to allow
33-
location descriptions to be manipulated on the stack. It is done in a manner
34-
that is backwards compatible with DWARF 5. This permits operations to act on
35-
location descriptions in an incremental, consistent, and composable manner.
36-
37-
It allows a small number of operations to be defined to address the requirements
38-
of heterogeneous devices as well as providing benefits to non-heterogeneous
39-
devices. It also acts as a foundation to provide support for other issues that
40-
have been raised that would benefit all devices.
32+
In DWARF 5, expressions are evaluated using a typed value stack, a separate
33+
location area, and an independent loclist mechanism. This extension unifies all
34+
three mechanisms into a single generalized DWARF expression evaluation model
35+
that allows both typed values and location descriptions to be manipulated on the
36+
evaluation stack. Both single and multiple location descriptions are supported
37+
on the stack. In addition, the call frame information (CFI) is extended to
38+
support the full generality of location descriptions. This is done in a manner
39+
that is backwards compatible with DWARF 5. The extension involves changes to the
40+
DWARF 5 sections 2.5 (pp 26-38), 2.6 (pp 38-45), and 6.4 (pp 171-182).
41+
42+
The extension permits operations to act on location descriptions in an
43+
incremental, consistent, and composable manner. It allows a small number of
44+
operations to be defined to address the requirements of heterogeneous devices as
45+
well as providing benefits to non-heterogeneous devices. It acts as a foundation
46+
to provide support for other issues that have been raised that would benefit all
47+
devices.
4148

4249
Other approaches were explored that involved adding specialized operations and
4350
rules. However, these resulted in the need for more operations that did not
@@ -100,7 +107,7 @@ Before presenting the proposed solution to supporting heterogeneous devices, a
100107
brief overview of the DWARF 5 expression evaluation model will be given to
101108
highlight the aspects being addressed by the extension.
102109

103-
## What is DWARF?
110+
## How DWARF Maps Source Language To Hardware
104111

105112
DWARF is a standardized way to specify debug information. It describes source
106113
language entities such as compilation units, functions, types, variables, etc.

0 commit comments

Comments
 (0)