<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style title="owaParaStyle"><!--P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
--></style>
</head>
<body ocsi="x">
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">Hi LLVM members,</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">I have been working to make target independent memory layout for struct type(Aggregate type) in my team.</font></div>
<div dir="ltr"><font size="2" face="tahoma">I think that struct type has different memory layouts according to each target system in current LLVM.</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">To implement target dependent concept for struct type,
</font></div>
<div dir="ltr"><font size="2" face="tahoma"><font face="tahoma">Frist, </font>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).</font></div>
<div dir="ltr"><font size="2" face="tahoma">Second, I have been adding two new intrinsic functions as following.</font></div>
<div dir="ltr"><font size="2" face="tahoma">1. "getelement" intrinsic function to load from bitfield of struct type.</font></div>
<div dir="ltr"><font size="2" face="tahoma">2. "setelement" intrinsic function to store to bitfied of struct type.</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">I would like to how do LLVM developers think about above concept.<br>
(advices, problems, other solutions etc...)</font></div>
<div dir="ltr"><font size="2" face="tahoma"><font face="tahoma"></font><br>
Thanks,</font></div>
<div dir="ltr"><font size="2" face="tahoma"><font face="tahoma">Jin-Gu Kang</font></div>
</font>
<div dir="ltr"> </div>
</body>
</html>