[LLVMdev] LLVM IR Type System Rewrite

Chris Lattner clattner at apple.com
Mon Feb 28 13:00:24 PST 2011


On Feb 28, 2011, at 9:47 AM, Andrew Clinton wrote:
> This looks like a good extension to the type system.  One thing that I 
> expected to work (when I first tried using opaque types) was for the 
> optimization passes and verification to operate correctly when using 
> opaque types, while the type could be made concrete later on -  after 
> optimization.  This turned out to be impossible, and in combination with 
> the lack of naming for opaque types, I decided to avoid their use 
> entirely.  In particular, could you address whether this overhaul of the 
> type system will address the following:
> 
> - The ability to create constants for named types without a defined 
> structure

There is no change, this won't be allowed.

> - Optimization involving PHI nodes for named types without a defined 
> structure

Not sure what you mean here, but I don't anticipate any change.

> - The ability to pass in named types to external function call arguments 
> and return values

This is representable in the IR, but will blow up at codegen time, just like today.

> Basically, I'd like to be able to construct valid programs involving 
> named types (without a defined structure), optimize/verify them, and 
> then provide a structure for the type later on.

I don't expect this series of changes to meaningfully impact this usage scenario, sorry!

-Chris



More information about the llvm-dev mailing list