Brain dump on type merging

Peter Collingbourne peter at pcc.me.uk
Thu Dec 4 12:36:19 PST 2014


On Wed, Dec 03, 2014 at 11:22:59PM -0500, Rafael EspĂ­ndola wrote:
> This then brought to memory an idea that I have seen mentioned on
> informal discussions but never on the list: Maybe we should have a
> single pointer type instead of i8*, i32*, %foobar**, etc.

+1. Right now, the Go frontend uses i8* to store all pointer types (bitcasting
to other types when needed) because Go can have type cycles in more places
than C family languages can. For example, it is possible to declare a pointer
type whose element type is itself. With this change, it should be possible
to simplify the generated IR considerably.

Thanks,
-- 
Peter



More information about the llvm-commits mailing list