<HTML><HEAD><TITLE>Mail</TITLE>
<META content="KsDHTMLEDLib.ocx, FreeWare HTML Editor 1.164.2, ?Kurt Senfer"
name=GENERATOR>
<META http-equiv=Content-Type content="text/html; charset=GB2312"></HEAD>
<BODY style="FONT-SIZE: 9pt; FONT-FAMILY: ËÎÌå" leftMargin=5 topMargin=5 #ffffff>
<DIV><!--AID_SENDTO_BEGIN-->Hi Guys,</DIV>
<DIV> I am really a fresh man on compiler. I want to make a
compiler that transform C-like language into assemble form, as the the same as
Pixie's or Aqsis's RenderMan Shading Language compiler, just like this,</DIV>
<DIV> </DIV>
<DIV>#!version
2.1.1<BR>surface<BR>#!parameters:<BR>uniform float Ka = 1<BR>uniform float Kd = 1<BR>#!variables:<BR>varying vector Nf<BR>varying vector temporary_0<BR>varying vector temporary_1<BR>varying vector temporary_2<BR>uniform vector temporary_3<BR>varying vector temporary_4<BR>varying vector temporary_5<BR>#!Init:<BR> return
<BR>#!Code:<BR> normalize ("v=v") temporary_0 N
<BR> faceforward ("v=vv") Nf temporary_0 I
<BR> vfromf
temporary_3
Ka<BR> vuvector
temporary_2 temporary_3<BR> ambient ("c=") temporary_4
<BR> mulvv
temporary_1 temporary_2
temporary_4<BR> vfromf
temporary_3
Kd<BR> vuvector
temporary_4 temporary_3<BR> diffuse ("c=n") temporary_5 Nf
<BR> mulvv
temporary_2 temporary_4
temporary_5<BR> addvv
temporary_0 temporary_1
temporary_2<BR> mulvv
Ci Cs
temporary_0<BR> movevv
Oi
Os<BR> mulvv
Ci Ci Oi<BR> return </DIV>
<DIV> </DIV>
<DIV> Where should I begin, I have read Mr.Lattner's
Kaleidoscope Tutorial, But How can I transform AST to the IR, optimize, then
output assemble code ?</DIV>
<DIV> Thanks very much. I wish I do not post in wrong
place.</DIV>
<DIV> </DIV>
<DIV><!--AID_EDIT_ATTACHMENT_BEGIN--><!--AID_EDIT_ATTACHMENT_END--></DIV>
<DIV><!--AID_FROMNAME_BEGIN-->Bo Schwarzstein<!--AID_FROMNAME_END-->£¬<A
href="mailto:<!--AID_FROMADDRESS_BEGIN-->bo.schwarzstein@gmail.com<!--AID_FROMADDRESS_END-->"><!--AID_FROMADDRESS_BEGIN-->bo.schwarzstein@gmail.com<!--AID_FROMADDRESS_END--></A></DIV>
<DIV>2007-12-15 </DIV></BODY></HTML>