[LLVMdev] LLVM IR Type System Rewrite

Jin Gu Kang jaykang10 at imrc.kist.re.kr
Sun Feb 27 12:59:01 PST 2011


Hi Chris

I have questions about new IR.

>  Named structs.
>  Unnamed structs (named structs with no names)
>  Anonymous structs (things like complex, which cannot be cyclic)
>
>Given this, the rules above would be that "only non-anonymous structs can have
>cycles" for example.  Arrays, pointers and other non-namable types can be
>considered to be anonymous as well.
>
>When printing out .ll files, anonymous structs (which cannot have cycles) are
>just printed inline, as in "{i32, i32}*".  Named structs are printed as their
>name ("%foo*"), and unnamed structs are printed with a number ("%42*").  This is
>nice and compatible with existing .ll files.

When initializer type of Global Variable with StructType is different from type of
Global Variable, current front-end makes an temporary StructType for initializer
as unnamed struct ("%42"). In this case, Is temporary StructType for initializer
Unnamed sturct (named structs with no names)?

And will be key(StructValType) of StructTypes(map) the number of elements and
isPacked in current IR plus a name? 
(if so, isPacked is likely to be redundant in some types.)

Thanks,
Jin-Gu Kang
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list