[LLVMdev] Unique shape and types
Chris Lattner
sabre at nondot.org
Wed Jun 20 16:30:13 PDT 2007
On Wed, 20 Jun 2007, Nicolas Geoffray wrote:
>> Yep. Sorry :(.
>
> "Sorry", like "this can really not be integrated in LLVM" or like "it is
> possible but it requires a lot of work to integrate it"? :)
it is not a desired feature for the LLVM type system itself.
>> Depending on your application, you could read debug info,
>>
>
> Actually I am not using llvm-gcc. I'm just targeting a new language and
> it would have been a lot easier implementing the compiler with LLVM if
> it had this kind of feature (string <-> type). But if it's not feasible,
> well I'll just stick with my higher type representation.
If you control the front-end, you have many options available to you. For
example, you could emit your own tables along the same lines as debug
info but specialized to capture the metadata you need.
> This leads to another question of type inference for dynamic languages
> (I refer to your slides from the LLVM meeting day). I do not see how you
> can integrate type inference on objects in LLVM without knowning
> inheritance between types. Maybe you only target type inference to
> dissociate floating point values from integer or object values?
I don't propose to do that analysis on the LLVM IR itself. :)
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list