[LLVMdev] LLVM IR Type System Rewrite
Chris Lattner
clattner at apple.com
Mon Feb 28 13:03:03 PST 2011
On Feb 27, 2011, at 12:50 PM, Rafael Ávila de Espíndola wrote:
>> @a = unnamed constant i32 0 @b = unnamed constant float 0.0
>>
>> This can be done today, and then the type system change won't affect
>> constant merging.
>
> It is true that it is better to have passes know that different types
> can have the same bits, but a type merging pass would still be useful
> for the passes that have not been updated or just for reducing the size
> of a bitcode file.
>
> The main question is if such a pass would be legal, or if we would
> guarantee that Foo and Bar in the above examples would remain as two
> different types.
It would be legal. Type names have no semantic effect on the program. They aren't tied to TBAA or anything like that.
-Chris
More information about the llvm-dev
mailing list