Skip to content

Commit 37d7f8c

Browse files
authored
Type fidelity (#148)
* Extend supported built-in types when using llvm-dimeta
1 parent 985e4e0 commit 37d7f8c

File tree

86 files changed

+538
-1024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+538
-1024
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ check-hidden =
55
skip = */.git,*/build*,*/.codespellrc,*/install,*/lulesh,wrap.py,*.llin
66
quiet-level = 2
77
ignore-regex = ^#include <(?:stdio)\.h>$|DEPENDEES|\\endcode
8-
ignore-words-list = uint,files'
8+
ignore-words-list = uint,files',re-used

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ Each user-defined type layout is assigned a unique integer type-id. Built-in typ
224224

225225
Type layouts are generated using one of the following methods:
226226

227-
* LLVM IR Type System: Extracts types directly from LLVM IR (`--typeart-typegen=ir`).
228-
* LLVM Debug Metadata (Default): Extracts types using the llvm-dimeta library and LLVM debug metadata (`--typeart-typegen=dimeta`).
227+
* **LLVM IR Type System**: Extracts types directly from LLVM IR (`--typeart-typegen=ir`).
228+
* **LLVM Debug Metadata** (Default): Extracts types using the llvm-dimeta library and LLVM debug metadata (`--typeart-typegen=dimeta`).
229229

230230
During execution, TypeART’s runtime library uses the type-id from callbacks to associate allocations with their type and layout. For example, consider the following struct:
231231

@@ -245,15 +245,16 @@ The TypeART pass may write a `types.yaml` file with the following content:
245245
extent: 16 // size in bytes
246246
member_count: 2
247247
offsets: [ 0, 8 ] // byte offsets from struct start
248-
types: [ 0, 10 ] // member type-ids (0->char, 10->pointer)
248+
types: [ 5, 1 ] // member type-ids (5->char, 1->pointer)
249249
sizes: [ 3, 1 ] // member (array) length
250250
```
251251
252252
<!--- @formatter:on --->
253253
254-
##### Limitations
254+
##### Limitations of LLVM IR Type System
255255
256-
The type-id system is tailored for LLVM IR types, which imposes certain constraints. For instance, C/C++ types like unsigned integers are currently unsupported (and represented like signed integers). The list of supported built-in type-ids is defined in [TypeInterface.h](lib/typelib/TypeInterface.h) and reflects the types that TypeART can represent.
256+
The list of supported built-in type-ids is defined in [TypeInterface.h](lib/typelib/TypeInterface.h) and reflects the types that TypeART can represent with **LLVM Debug Metadata**.
257+
In contrast, when using **LLVM IR Type System**, certain constraints are imposed. For instance, C/C++ types like unsigned integers are unsupported (and represented like signed integers).
257258
258259
259260
#### 1.1.4 Filtering allocations

0 commit comments

Comments
 (0)