Skip to content

Get rid of reinterpret in its current form #22849

@Keno

Description

@Keno

I don't like the way reinterpret is currently implemented. It puns on the notion of an array. One problem we recently had to deal with is that alignment guarantees are different between different types (those are now disallowed). Another is that it prevents us from doing more strict TBAA on array element types. I think we should get rid of reinterpret completely and replace it with a ReinterpretArray type, who's getindex method performs the appropriate load from the original array. That way we never have an Array with incorrectly typed storage, but can retain the convenience (and once again allow reinterpret for types with mismatched alignment).

Metadata

Metadata

Assignees

Labels

arrays[a, r, r, a, y, s]compiler:codegenGeneration of LLVM IR and native code

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions