[LLVMdev] LLVM IR Type System Rewrite
Andrew Clinton
andrew at sidefx.com
Mon Feb 28 15:42:37 PST 2011
On 02/28/2011 04:00 PM, Chris Lattner wrote:
>> - Optimization involving PHI nodes for named types without a defined
>> structure
> Not sure what you mean here, but I don't anticipate any change.
>
I thinking along the lines of conversion to select instructions, and
elimination of PHIs with identical incoming values - SSA-based
transformations that are currently valid for concrete types.
>> - 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.
>
I'm not sure what you mean. Code generation requires concrete types, so
it would still be necessary to specify the structure for all types
before code generation time.
Last time I checked, it's not currently possible to pass opaque types to
external functions and have a valid IR - this currently fails in the
verifier. It is possible to pass pointers to opaque types, though.
>> 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
My two cents are that this is a useful usage scenario to consider if any
major changes are being made to the type system. A ton of meaningful
optimizations can be performed without requiring concrete types, and it
would provide a nice interface for type system extension (without making
core changes to the IR).
Andrew
More information about the llvm-dev
mailing list