[LLVMdev] [proposal] Extensible IR metadata
Chris Lattner
clattner at apple.com
Fri Sep 11 11:29:19 PDT 2009
On Sep 11, 2009, at 11:08 AM, Kenneth Uildriks wrote:
> On Fri, Sep 11, 2009 at 11:57 AM, Chris Lattner <clattner at apple.com>
> wrote:
>> The demand for metadata is even greater in non-C languages. For
>> high level
>> scripting languages like python, it would be nice to be able to do
>> static type
>> inference and annotate various pointers with type class information
>> ("this is
>> a python string object", "this is a dictionary", whatever).
>
> So this particular metadata would be an extension of the type? And
> get propagated through as you create instructions that depend on other
> instructions which had the type metadata attached?
No, this would be a property of the operation. In a dynamically typed
language like python (and many others) a naive translation will turn
all python objects into "void*"s. However, with some static or
dynamic analysis, many types can be guessed at or inferred. This is a
property of various operations, not about "void*".
-Chris
More information about the llvm-dev
mailing list