Files
revng-revng/lib/DataLayoutAnalysis
Pietro Fezzardi 75aff6a4a9 DLA: always copy fields when updating Model
Before this commit, DLA's backend often emitted things like:

```c
struct x {
  struct y {
    int32_t z;
    uint8_t padding[4];
  } _offset_0;
  uint8_t padding[8];
};
```

This is suboptimal, since the fields of y actually can just be inlined
into x, giving:

```c
struct x {
  int32_t z;
  uint8_t padding[12];
};
```

This behaviour was due to a logic bug carried over from old versions of
the code, and partially extended, but never revisited nor thought
through.

This commit fixes the problem, making the second behaviour the only
thing DLA ever does when updating the model.
Basically, struct fields are copied over field by field, instead of
inserting the bulk struct (y in the example) inside the larger struct to
update (x in the example).
2023-10-18 15:19:52 +02:00
..
2023-10-05 19:18:38 +02:00
2023-09-07 12:19:35 +02:00
2022-04-19 12:17:59 +02:00
2023-04-14 14:54:14 +02:00