[LLVMdev] [proposal] Extensible IR metadata
kennethuil at gmail.com
Fri Sep 11 11:08:32 PDT 2009
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?
I found myself wishing for such a thing several times recently. I
ended up using a "type tag" of type [0 x opaque*] in my structs to
force the type system to differentiate them from each other and make
unique classes out of them. It works, but I need a separate hashtable
to get back to a "class description" from a Value of a given Type.
More information about the llvm-dev