[LLVMdev] Structure memory layout

Jin Gu Kang jaykang10 at imrc.kist.re.kr
Mon Oct 18 23:57:41 PDT 2010


Hi LLVM members,

I have been working to make target independent memory layout for struct type(Aggregate type) in my team.
I think that struct type has different memory layouts according to each target system in current LLVM.

To implement target dependent concept for struct type,
Frist, I have been implementing common type for struct type on bitcode at compilation time using llvm-gcc and then changing common type to target specific types at code generation time using llc (reconstruct StructLayout).
Second, I have been adding two new intrinsic functions as following.
1. "getelement" intrinsic function to load from bitfield of struct type.
2. "setelement" intrinsic function to store to bitfied of struct type.

I would like to how do LLVM developers think about above concept.
(advices, problems, other solutions etc...)

Thanks,
Jin-Gu Kang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101019/193d0c81/attachment.html>


More information about the llvm-dev mailing list