Commit Graph

9 Commits

Author SHA1 Message Date
Alvise de Faveri e8dfaa3a86 DLA: Fix missing AccessLayout field in structs
The BaseLayout should be the fist field of each StructLayout, but it
is never really added.
2021-05-21 18:50:58 +02:00
Pietro Fezzardi 2b73e29249 Decouple LayoutTypeSystemNode from LLVM IR 2021-05-14 11:23:40 +02:00
Pietro Fezzardi 476064d855 [DLA] kill structural deduplication of Layouts
Before this commit, the MakeLayout step of the DLA used to deduplicate
structurally equal Layouts. This has turned out to be wrong when going
forward with the emission of types in C.
Being able to tell apart two different types that are structurally equal
is important for the emission of C types. Throwing this information away
with deduplication is bad. This commit disables such deduplication.
2021-02-02 11:23:53 +01:00
Pietro Fezzardi 44564c2ba7 [DLA] export layouts to DLAPass 2021-02-02 11:23:53 +01:00
Pietro Fezzardi 52d0d9aeb2 [DLA] Move Layouts declarations in separate files
This is a preliminary step for allowing DLAPass to export the computed
layouts as analysis results.
2021-02-02 11:23:53 +01:00
Pietro Fezzardi 59076db31b [DLA] Avoid instance links for unsupported offsets
This commit prevents the creation of instance links for offsets that we
don't support yet, during the CreateIntraProceduralTypes DLAStep.
This makes possible to avoid explicitly handling those cases in many
DLASteps, such as ComputeUpperMemberAccess,
ComputeNonInterferingComponents, and DLAMakeLayouts.

The offsets that are not supported yet are:
- all negative offsets
- all strided offsets with non-strictly-positive stride values
- all strided offsets with non-strictly-positive stride values
- all strided offsets with known negative trip-count

Some beneficial side-effects of avoiding the creation of such links are:
- the total number of edges on the graph is reduced, reducing the worst
  case depth of most visits
- it's impossible to create types with null or negative size (that we
  wouldn't know how to emit in C)
2021-02-02 11:23:53 +01:00
Pietro Fezzardi 730854aa1c [DLA] Add CreateNonInterferingComponents DLAStep 2021-02-02 11:23:53 +01:00
Pietro Fezzardi cdca33a99f [DLA] Guard costly verify calls with VerifyLog 2021-02-02 11:23:53 +01:00
Pietro Fezzardi 6119e54e1b [DLA] Add MakeLayouts DLAStep 2021-02-02 11:23:53 +01:00