Henri Rosten via llvm-dev
2020-Sep-30 12:33 UTC
[llvm-dev] Disabling llvm-link struct type merging
Hello, I notice llvm-link merges structurally identical struct types to avoid duplication. As an example, the following IR before llvm-link: ``` %struct.B = type { %struct.A } %struct.A = type { void (i8*, i8*)* } %struct.C = type { %struct.A } ``` becomes: ``` %struct.B = type { %struct.A } %struct.A = type { void (i8*, i8*)* } ``` after running llvm-link: it drops struct.C since it has the same layout as struct.B. Is there a way to tell llvm-link to _not_ merge structurally identical struct types and use the original struct types instead, even if it causes duplication in struct layouts? Thanks, -- Henri