<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3199" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY 
style="WORD-WRAP: break-word; khtml-nbsp-mode: space; khtml-line-break: after-white-space" 
bgColor=#ffffff>
<DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=sabre@nondot.org href="">Chris Lattner</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=llvmdev@cs.uiuc.edu 
  href="">LLVM Developers Mailing List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=cr88192@hotmail.com 
  href="">BGB</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, October 22, 2007 10:44 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [LLVMdev] OT: new here, 
  dynamic/runtime compilation (in general)</DIV>
  <DIV><FONT face=Arial size=2></FONT><BR></DIV><BR>
  <DIV>On Oct 21, 2007, at 5:27 PM, BGB wrote:</DIV>
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
  face=Arial size=2></FONT><BR class=Apple-interchange-newline></DIV>
  <BLOCKQUOTE type="cite"><SPAN class=Apple-style-span 
    style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto; orphans: 2; widows: 2">
    <DIV style="MARGIN: 0px"><FONT class=Apple-style-span color=#0000dd><FONT 
    class=Apple-style-span face=Arial size=2><SPAN class=Apple-style-span 
    style="FONT-SIZE: 10px">well, sadly, I am not sure how people are on this 
    list...</SPAN></FONT></FONT></DIV></SPAN></BLOCKQUOTE>
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
  face=Arial size=2></FONT><BR class=khtml-block-placeholder></DIV>
  <DIV>I'd suggest browsing through the llvmdev mailing list archive.</DIV>
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
  face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><BR><SPAN class=Apple-style-span 
  style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto; orphans: 2; widows: 2"> </DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=Apple-style-span 
style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><FONT size=2>yes, may make 
sense.</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=Apple-style-span 
style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><FONT size=2>just, I encounter a lot 
of places where people start flaming as soon as the topic drifts at all OT (as 
per their personal definitions).</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=Apple-style-span 
style="FONT-SIZE: 10px; FONT-FAMILY: Arial"><FONT 
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr><FONT face=Arial><FONT size=2><FONT face=Arial><FONT size=2><FONT 
face=Arial size=3><SPAN class=Apple-style-span 
style="FONT-SIZE: 10px; FONT-FAMILY: Arial"></SPAN></FONT></FONT></FONT></FONT></FONT> </DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <BLOCKQUOTE type="cite">
    <DIV><FONT face=Arial size=3><SPAN class=Apple-style-span 
    style="FONT-SIZE: 10px; FONT-FAMILY: Arial"></SPAN></FONT> </DIV>
    <DIV><FONT face=Arial size=2><SPAN class=Apple-style-span 
    style="FONT-SIZE: 10px; FONT-FAMILY: Arial">now, what I do with it is 
    this:</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=Apple-style-span 
    style="FONT-SIZE: 10px; FONT-FAMILY: Arial">I use C as a scripting 
    language...</SPAN></FONT></DIV><BR 
  class=Apple-interchange-newline></SPAN></BLOCKQUOTE><BR>
  <DIV>Sounds like a fun project.  Note that the clang C front-end also 
  supports use in a JIT environment: this will allow you to JIT the full 
  generality of C code (when clang is complete).  Today while clang is not 
  complete, it is far enough along to be very useful for a wide variety of 
  numeric environments, as its scalar, vector, and array support are quite 
  advanced.</DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV></BLOCKQUOTE>
<DIV dir=ltr><FONT face=Arial size=2>yes.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>clang is interesting, so I will continue to 
watch and hope it does something cool.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>sorry for not having done much research 
here (if it so happens all this exists already), but I will assume that it 
likely implements the same basic kind of vector handling as gcc (rather 
than geometric vectors). they need not be confused (per-element multiplication 
is an almost useless operation in geometry, but dot-product is almost 
mandatory...).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>ok, just in my case, I guess I am a little 
fussy/weird, wanting efficient dot and cross products  (if at all 
possible, though these operations at present don't exist natively within 
SSE...), among many other operations (length, lerp, renormalization, 
..).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>I suspect the people behind gcc for 
whatever reason did not know of or couldn't really see much need for geometric 
vector support...</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>I also use quaternions (as yet another 
tweaky compiler extension, basically, they look like 4 element float vectors but 
have a few different operations from those of 4-element geometric 
vectors).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>quaternions are also a complex space, 
and can thus also be used as part of the normal numeric tower (much as good old 
complexes...). though a little arbitrary, I also allow operations between 
complexes and quaterions (the complex automatically gets promoted to a quat in 
the process), but it is arbitrary in that the complexes are arbitrarily mapped 
to the WI plane (much as how 2D vectors automatically map to the XY plane 
in 3D situations, or converting a 3D-vector to a 2D vector often involves simply 
discarding Z, even though the XY in a 2D vector could concievably map to 
any possible plane within a 3D space...).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>it is arbitrary, but it 
works...</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>but, I guess I will have to investigate all 
this (to see more what LLVM does and does not support...).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>dunno if, or if there would be any 
intention to implement features like these (I would not mind that much though if 
they were only builtin functions or similar, as that is how my gcc-fallback 
support works, but in the case of my compiler, many of these operations also 
exist via overloaded operators).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>then again, probably a fairly smart 
compiler could still get plenty good results out of inline functions and 
intrinsics or something (as it so happens, my compiler is not so smart here, so 
I made these features builtin, and fell back to functions for more involved 
operations, such as quaternion slerp, ...).</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>or something...</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
  face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><BR 
  class=khtml-block-placeholder></DIV>
  <DIV>-Chris</DIV>
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
  face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT><BR 
class=khtml-block-placeholder></DIV></BLOCKQUOTE></DIV></BODY></HTML>