Files
revng-revng/include/revng
Andrea Gussoni 02cc6923d0 EmitFieldAccesses: implement pass
The `EmitFieldAccesses` pass transforms `clift` by taking pointer-typed
expressions computed via integerr arithmetic with type-safe field
accesses and array accesses.

The transformation is split in three main phases:
1) `PointerArithmetic` computation.
2) `BestTraversal` computation.
3) `FieldAccess` `clift` rewrite.

The high level driver is implemented in the `EmitFieldAccesses` header
and cpp, while the nested 3 phases are implemented respectively in
`PointerArithmetic`, `BestTraversal` and `FieldAccessReplacement`.

The `computerPointerArithmetic` phase is concerned with taking a
pointer-typed `ExpressionOp`, called `PointerToReplace`, and expressing
it in a `BasePointer+Offset` form.

The `computeBestTraversal` phase is concerned with computing the best
traversal of the type pointed to by `BasePointer`, that can be used to
rewrite the pointer arithmetic in `clift` with just field accesses and
array subscripts.

The `replaceFieldAccess` phase takes the `Traversal` computed at the
previous step, and actually rewrites in `clift` the `PointerToReplace`
in terms of field accesses and array accesses w.r.t. the `BasePointer`.
2026-03-18 17:25:13 +01:00
..
2026-02-13 08:41:39 +02:00
2026-02-25 12:47:27 +01:00
2025-02-13 13:10:51 +02:00
2025-10-31 17:25:03 +01:00
2025-12-16 17:42:07 +01:00
2025-10-31 17:25:03 +01:00
2026-02-25 12:47:27 +01:00
2025-05-07 16:42:34 +02:00
2025-12-03 17:59:18 +01:00
2024-07-10 15:34:19 +02:00
2025-06-27 17:12:18 +02:00
2026-02-25 12:47:27 +01:00
2025-10-24 18:20:48 +02:00
2025-12-10 16:16:14 +01:00