[LLVMdev] LLVM IR Type System Rewrite

Michael Muller mmuller at enduden.com
Thu Mar 3 14:34:43 PST 2011


Chris Lattner wrote:
> Several people have been proding me to write up my thoughts on how to fix the IR  type system for LLVM 3.0.  Here are some (fairly stream of conscious) thoughts on the matter:
> http://nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
> 
> Comments welcome!

I like this change a lot.

I'm not sure if it is feasible or generally desirable, but one thing that
would have been very helpful in my use case would have been to be able to
construct structure types incrementally and to be able to access slots of the
un-finished type, for example:

StructType *NewSTy = StructType::get("mylist", TheModule);
NewSTy->addField(Type::getInt32Ty(NewSTy->getContext());

Then given a Value of type NewSTy, do a gep on slot 0.

> 
> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 


=============================================================================
michaelMuller = mmuller at enduden.com | http://www.mindhog.net/~mmuller
-----------------------------------------------------------------------------
Society in every state is a blessing, but government even in its best state
is but a necessary evil; in its worst state an intolerable one... 
 - Thomas Paine 
=============================================================================



More information about the llvm-dev mailing list