[LLVMdev] LLVM IR is a compiler IR
Chris Lattner
clattner at apple.com
Tue Oct 4 17:07:56 PDT 2011
On Oct 4, 2011, at 4:41 PM, Talin wrote:
>> One thing you would need is the ability to assign names to struct members. Currently LLVM refers to struct members by numerical index, and I wouldn't want to change that. However, in order to be visible in the debugger, you also have to assign a name to each member. Note that this information doesn't need to take a lot of space in the module - names are highly compressible, especially fully qualified names (foo.bar.X.Y.Z) where you have a whole bunch of names that start with the same prefix. (In my own frontend, I sort names by frequency, so that the names that are used most often have the lowest assigned IDs. This allows the reference to the name to be stored in fewer bits.)
>
> Talin, if you're trying to produce a "C virtual machine" you basically need everything in a C AST. You're scratching the surface of the issues.
>
> I was trying to limit my response to just a few examples - I realize that there's a ton of things I've left out. I guess what I am describing is the same as Microsoft's "Managed C++" - the ability to compile C++ programs to the CLR. Note that Managed C++ doesn't give you every possible feature of C++, you can't take an arbitrary C++ program and expect to compile it in managed mode.
Are you willing to give up the ability to interoperate with existing ABIs and code compiled by other compilers?
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111004/c657c493/attachment.html>
More information about the llvm-dev
mailing list