<div dir="ltr">ok,</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 10:55 PM, Geoffrey Mainland <span dir="ltr">&lt;<a href="mailto:mainland@apeiron.net" target="_blank">mainland@apeiron.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The plan is as I wrote below:<br>
<div class="im"><br>
  7.8 will only support passing 128-bit SIMD vectors in registers on x86-64.<br>
  Other vectors sizes, and all vectors on x86-32, will be passed on the<br>
stack.<br>
<br>
</div>There is not enough time for anything else at his point.<br>
<br>
Geoff<br>
<div class="im"><br>
On 09/12/2013 10:40 PM, Carter Schonwald wrote:<br>
&gt; let me know before the weekend starts.... so i can make time to help<br>
&gt; if need be (unless Austin gives breathing room on merge window for<br>
&gt; such a thing)<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Sep 12, 2013 at 3:03 PM, Carter Schonwald<br>
</div><div class="im">&gt; &lt;<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a> &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     emphasis on &quot;very very clear warning&quot;<br>
&gt;<br>
&gt;<br>
&gt;     On Thu, Sep 12, 2013 at 3:00 PM, Carter Schonwald<br>
</div>&gt;     &lt;<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a> &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>&gt;&gt;<br>
<div class="im">&gt;     wrote:<br>
&gt;<br>
&gt;         after a bit more reflection: as long as we provide a clear<br>
&gt;         warning that 7.8 may at some point no longer work with llvm<br>
&gt;         3.4, i&#39;m down for the change. We just need to make it very<br>
&gt;         very clear, that it may stop working. (and have AVX support<br>
&gt;         via passing on the stack with &lt;= 3.3)<br>
&gt;<br>
&gt;         before i go and upstream that patch, could we benchmark how<br>
&gt;         multivector perf fairs with  patched llvm? i don&#39;t have the<br>
&gt;         right hardware for doing the benchmarks you did in your paper...<br>
&gt;<br>
&gt;         sorry for being a bit over the top yesterday, i&#39;m just<br>
&gt;         juggling a lot right now :)<br>
&gt;<br>
&gt;         -Carter<br>
&gt;<br>
&gt;<br>
&gt;         On Thu, Sep 12, 2013 at 2:47 PM, Carter Schonwald<br>
&gt;         &lt;<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a><br>
</div><div class="im">&gt;         &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;             oh, i didn&#39;t realize you had already done the work! (bah,<br>
&gt;             i&#39;m sorry, i feel terrible)<br>
&gt;<br>
&gt;             I thought i had communicated ~ a month ago that I was<br>
&gt;             worried about release engineering interaction with making<br>
&gt;             it impossible to then make a subsequent changes more<br>
&gt;             thoughtfully because of the LLVM release cycle. This<br>
&gt;             concern of mine balloned a bit after helping triage a huge<br>
&gt;             number of problems people were hitting with the Clang<br>
&gt;             transition on mac thats underway.<br>
&gt;<br>
&gt;             Its actually very easy to package up an llvm with that<br>
&gt;             patch, much simpler than &quot;build GHC from source&quot;. In fact,<br>
&gt;             on OS X, the simplest way to install LLVM by default<br>
&gt;             essentially does a build from source.<br>
&gt;<br>
&gt;             Geoff, it&#39;d at least be worth running the benchmarks to<br>
&gt;             measure the work! (and as I said, i&#39;m happy to help)<br>
&gt;<br>
&gt;<br>
&gt;             On Thu, Sep 12, 2013 at 2:30 PM, Geoffrey Mainland<br>
</div><div><div class="h5">&gt;             &lt;<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a> &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;                 If users have to do a custom llvm build, we might as<br>
&gt;                 well ask them to<br>
&gt;                 build ghc from source too.<br>
&gt;<br>
&gt;                 Unless I misunderstood ticket #8033, you were<br>
&gt;                 originally quite gung-ho<br>
&gt;                 about changing the LLVM calling conventions to support<br>
&gt;                 passing SIMD<br>
&gt;                 vectors of all widths in registers on both x86-32 and<br>
&gt;                 -64, getting these<br>
&gt;                 patches into LLVM 3.4, and making sure that GHC 7.8<br>
&gt;                 would support all<br>
&gt;                 this. I spent several days making sure this could<br>
&gt;                 happen from the GHC<br>
&gt;                 side. Now that the plan has changed, I will back out<br>
&gt;                 that work, and 7.8<br>
&gt;                 will only support passing 128-bit SIMD vectors in<br>
&gt;                 registers on x86-64.<br>
&gt;                 Other vectors sizes, and all vectors on x86-32, will<br>
&gt;                 be passed on the stack.<br>
&gt;<br>
&gt;                 Geoff<br>
&gt;<br>
&gt;                 On 9/12/13 1:32 PM, Carter Schonwald wrote:<br>
&gt;                 &gt; to repeat:<br>
&gt;                 &gt;<br>
&gt;                 &gt;  I think no one would have object to having a<br>
&gt;                 clearly marked,<br>
&gt;                 &gt; experimental -fllvmExpermentalAVX flag that requires<br>
&gt;                 building LLVM<br>
&gt;                 &gt; with a specified patch, as a way to showcase your<br>
&gt;                 multivector work!<br>
&gt;                 &gt;<br>
&gt;                 &gt; that would evade all of my objections (provided avx<br>
&gt;                 is still exposed<br>
&gt;                 &gt; with normal -fllvm, but spilled to stack rather than<br>
&gt;                 registers), and<br>
&gt;                 &gt; i&#39;d actually argue in favor of such.<br>
&gt;                 &gt;<br>
&gt;                 &gt; Especially since it would not impose any release<br>
&gt;                 cycle constraints  on<br>
&gt;                 &gt; a subsequent, systematic exploration for using XMM /<br>
&gt;                 YMM / ZMM  in the<br>
&gt;                 &gt; calling convention going forward.<br>
&gt;                 &gt;<br>
&gt;                 &gt; @Geoff, Simons, Johan, and others: does anyone<br>
&gt;                 object to that approach?<br>
&gt;                 &gt;<br>
&gt;                 &gt; applying such a calling convention patch to llvm is<br>
&gt;                 really quite<br>
&gt;                 &gt; straightforward, and the build process is pretty<br>
&gt;                 zippy after that too.<br>
&gt;                 &gt;<br>
&gt;                 &gt; cheers<br>
&gt;                 &gt; -Carter<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt; On Thu, Sep 12, 2013 at 2:34 AM, Carter Schonwald<br>
&gt;                 &gt; &lt;<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a><br>
&gt;                 &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>&gt;<br>
</div></div>&gt;                 &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a><br>
<div><div class="h5">&gt;                 &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>&gt;&gt;&gt; wrote:<br>
&gt;                 &gt;<br>
&gt;                 &gt;     that said it does occur to me that there is an<br>
&gt;                 alternative<br>
&gt;                 &gt;     solution that may be acceptable for everyone!<br>
&gt;                 &gt;<br>
&gt;                 &gt;     what about providing a pseudo compatible way called<br>
&gt;                 &gt;     -fllvm-experimentalAVX (or something), and<br>
&gt;                 simply require that for<br>
&gt;                 &gt;     it to be used, the user has an llvm Patched with<br>
&gt;                 the YMM simd in<br>
&gt;                 &gt;     register fun call support? internally that could<br>
&gt;                 just be an llvm<br>
&gt;                 &gt;     way that trips the logic that puts the first few<br>
&gt;                 AVX values in<br>
&gt;                 &gt;     those YMM1-6 slots if they are the first args,<br>
&gt;                 so only the stack<br>
&gt;                 &gt;     spilling logic needs be changed?<br>
&gt;                 &gt;<br>
&gt;                 &gt;     (ie it wouldn&#39;t be tied to an llvm version, but<br>
&gt;                 rather this pseduo<br>
&gt;                 &gt;     way flag)<br>
&gt;                 &gt;<br>
&gt;                 &gt;     does that make sense?<br>
&gt;                 &gt;<br>
&gt;                 &gt;     either way, i&#39;d really like having avx even if<br>
&gt;                 its always spilled<br>
&gt;                 &gt;     to stack at funcalls with standard LLVMs!<br>
&gt;                 &gt;<br>
&gt;                 &gt;     cheers<br>
&gt;                 &gt;     -carter<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;     On Thu, Sep 12, 2013 at 2:28 AM, Carter Schonwald<br>
&gt;                 &gt;     &lt;<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a><br>
&gt;                 &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>&gt;<br>
</div></div>&gt;                 &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a><br>
<div class="HOEnZb"><div class="h5">&gt;                 &lt;mailto:<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a>&gt;&gt;&gt;<br>
&gt;                 &gt;     wrote:<br>
&gt;                 &gt;<br>
&gt;                 &gt;         Geoff,<br>
&gt;                 &gt;<br>
&gt;                 &gt;         a prosaic reason why there *might* be a<br>
&gt;                 fundamentally breaking<br>
&gt;                 &gt;         change would be the following idea nathan<br>
&gt;                 howell suggested to<br>
&gt;                 &gt;         me this afternoon: change the Sp and SPLim<br>
&gt;                 register so that<br>
&gt;                 &gt;         the X86/x86_64 target can use the CPU&#39;s Push<br>
&gt;                 and (maybe) Pop<br>
&gt;                 &gt;         instructions for the  stack manipulations,<br>
&gt;                 rather than MOV and<br>
&gt;                 &gt;         fam.  see<br>
&gt;                 <a href="http://ghc.haskell.org/trac/ghc/ticket/8272" target="_blank">http://ghc.haskell.org/trac/ghc/ticket/8272</a> (which<br>
&gt;                 &gt;         is just what i&#39;ve said). Thats one change<br>
&gt;                 thats pretty simple<br>
&gt;                 &gt;         but deep, but likely worth exploring.<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;         i&#39;m saying any ABI change for GHC 7.10,<br>
&gt;                 would likely entail<br>
&gt;                 &gt;         patching LLVM 3.4, because thats the only<br>
&gt;                 LLVM version likely<br>
&gt;                 &gt;         to come out between now and whenever we get<br>
&gt;                 7.10 out (assuming<br>
&gt;                 &gt;         7.10 lands within the next 8-12 months,<br>
&gt;                 which is reasonable<br>
&gt;                 &gt;         since we&#39;ve got noticeably more (amazing)<br>
&gt;                 people  helping out<br>
&gt;                 &gt;         lately). Thus, any change there entails<br>
&gt;                 either asking the llvm<br>
&gt;                 &gt;         folks to support &gt;1 GHC convention per<br>
&gt;                 architecture, or<br>
&gt;                 &gt;         replace the current one!  I&#39;d rather do the<br>
&gt;                 latter than the<br>
&gt;                 &gt;         former, when it comes to asking other people<br>
&gt;                 to maintain it :)<br>
&gt;                 &gt;         (and llvm engineers do in fact help out<br>
&gt;                 maintaining that code)<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;         have you run a Nofib, or even benchmarks<br>
&gt;                 restricted to your<br>
&gt;                 &gt;         multivector code, for the current calling<br>
&gt;                 convention<br>
&gt;                 &gt;         (including the spilling AVX vectors to the<br>
&gt;                 stack thats the<br>
&gt;                 &gt;         current plan i gather) VS passing in<br>
&gt;                 registers with an LLVM<br>
&gt;                 &gt;         built using the patches i worked out ~ 2<br>
&gt;                 months ago?  it&#39;d be<br>
&gt;                 &gt;         really easy to build that custom llvm, then<br>
&gt;                 run the<br>
&gt;                 &gt;         benchmarks! (i&#39;m happy to help, and<br>
&gt;                 ultimately, benchmarks<br>
&gt;                 &gt;         will reveal if its worth while or not! And<br>
&gt;                 if the main goal is<br>
&gt;                 &gt;         for your talk, its still valid even if its<br>
&gt;                 not in the merge<br>
&gt;                 &gt;         window over the next 4 days).<br>
&gt;                 &gt;<br>
&gt;                 &gt;         I really think its not obvious what the<br>
&gt;                 &quot;best&quot; abi<br>
&gt;                 &gt;         change would be! It really will require<br>
&gt;                 coming up with a list<br>
&gt;                 &gt;         of variants, implementing them, and running<br>
&gt;                 nofib with each<br>
&gt;                 &gt;         variant, which i lack the compute/human time<br>
&gt;                 resources to do<br>
&gt;                 &gt;         this week. Modern hardware is complex enough<br>
&gt;                 that for<br>
&gt;                 &gt;         something like an ABI change, the only<br>
&gt;                 healthy attitude can be<br>
&gt;                 &gt;         &quot;lets benchmark it!&quot;.<br>
&gt;                 &gt;<br>
&gt;                 &gt;         i&#39;d really like any change in calling<br>
&gt;                 convention to also<br>
&gt;                 &gt;         improve perf on codes that aren&#39;t explicitly<br>
&gt;                 simd! (and a<br>
&gt;                 &gt;         conservative simd only change,<br>
&gt;                 blocks/conflicts with that<br>
&gt;                 &gt;         augmentation going forward, and not just for<br>
&gt;                 the stack pointer<br>
&gt;                 &gt;         example i mention early)<br>
&gt;                 &gt;<br>
&gt;                 &gt;          Not just scalar floats in simd registers ,<br>
&gt;                 but perhaps also<br>
&gt;                 &gt;         words/ints !<br>
&gt;                 &gt;<br>
&gt;                 &gt;         (though that latter bit  might be pretty<br>
&gt;                 ambitious and subtle,<br>
&gt;                 &gt;         i&#39;ll need to investigate that a bit to see<br>
&gt;                 how feasible it may<br>
&gt;                 &gt;         be).<br>
&gt;                 &gt;         SIMD has great support for  ints/words, and<br>
&gt;                 any partial abi<br>
&gt;                 &gt;         change on the llvm backend now would make it<br>
&gt;                 hard to support<br>
&gt;                 &gt;         that later well (or at least, thats what it<br>
&gt;                 looks like to me).<br>
&gt;                 &gt;          actually effectively using simd for scalar<br>
&gt;                 ints and words<br>
&gt;                 &gt;         should be doable, but might force us to be a<br>
&gt;                 bit more<br>
&gt;                 &gt;         thoughtful on how GHC internally<br>
&gt;                 distinguishes ints used for<br>
&gt;                 &gt;         address arithmetic, vs ints used as data.<br>
&gt;                  (interestingly, i&#39;m<br>
&gt;                 &gt;         not sure if any current extent x86 calling<br>
&gt;                 convention does that!)<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;             That single change would make 7.10<br>
&gt;                 require a completely<br>
&gt;                 &gt;         different llvm and native code gen<br>
&gt;                 convention from our current<br>
&gt;                 &gt;         one, plus touch all of the code gen on x86<br>
&gt;                 architectures.<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;         basically: we&#39;re lucky that everyone builds<br>
&gt;                 haskell code from<br>
&gt;                 &gt;         source, so ABI compat across GHC versions is<br>
&gt;                 a non issue. BUT,<br>
&gt;                 &gt;         any ABI changes should be backed by<br>
&gt;                 benchmarks (at least when<br>
&gt;                 &gt;         the change is performance motivated).<br>
&gt;                 Likewise, because we use<br>
&gt;                 &gt;         LLVM as an external dep for the -fllvm<br>
&gt;                 backend, we really need<br>
&gt;                 &gt;         to keep how their release cycle interacts<br>
&gt;                 with our release<br>
&gt;                 &gt;         cycle, because people use haskell and ghc!<br>
&gt;                 which as many like<br>
&gt;                 &gt;         to say, is both a boon and a pain ;).<br>
&gt;                 &gt;<br>
&gt;                 &gt;         Having people hit ghc acting broken with an<br>
&gt;                 llvm that was<br>
&gt;                 &gt;         &quot;supported before&quot; is  risky support problem<br>
&gt;                 to deal with.<br>
&gt;                 &gt;         having an LLVM head variant support a<br>
&gt;                 modified ABI, and then<br>
&gt;                 &gt;         later needing to break it for 7.10 (for one<br>
&gt;                 of the possible<br>
&gt;                 &gt;         exploratory reasons above) would lead to a<br>
&gt;                 support headache I<br>
&gt;                 &gt;         don&#39;t wish on anyone.<br>
&gt;                 &gt;<br>
&gt;                 &gt;         pardon the verbose answer, but thats my<br>
&gt;                 offhand take<br>
&gt;                 &gt;<br>
&gt;                 &gt;         cheers<br>
&gt;                 &gt;         -Carter<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;         On Wed, Sep 11, 2013 at 10:10 PM, Geoffrey<br>
&gt;                 Mainland<br>
&gt;                 &gt;         &lt;<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;&gt; wrote:<br>
&gt;                 &gt;<br>
&gt;                 &gt;             We support compiling some code with<br>
&gt;                 -fllvm and some not in<br>
&gt;                 &gt;             the same<br>
&gt;                 &gt;             executable. Otherwise how could users of<br>
&gt;                 the Haskell<br>
&gt;                 &gt;             Platform link their<br>
&gt;                 &gt;             -fllvm-compiled code with<br>
&gt;                 native-codegen-compiled<br>
&gt;                 &gt;             libraries like base, etc.?<br>
&gt;                 &gt;<br>
&gt;                 &gt;             In other words, the LLVM and native back<br>
&gt;                 ends use the same<br>
&gt;                 &gt;             calling<br>
&gt;                 &gt;             convention. With my SIMD work, they<br>
&gt;                 still use the same calling<br>
&gt;                 &gt;             conventions, but the native codegen can<br>
&gt;                 never generate<br>
&gt;                 &gt;             code that uses<br>
&gt;                 &gt;             SIMD instructions.<br>
&gt;                 &gt;<br>
&gt;                 &gt;             Geoff<br>
&gt;                 &gt;<br>
&gt;                 &gt;             On 09/11/2013 10:03 PM, Johan Tibell wrote:<br>
&gt;                 &gt;             &gt; OK. But that doesn&#39;t create a problem<br>
&gt;                 for the code we<br>
&gt;                 &gt;             output with the<br>
&gt;                 &gt;             &gt; LLVM backend, no? Or do we support<br>
&gt;                 compiling some code<br>
&gt;                 &gt;             with -fllvm and<br>
&gt;                 &gt;             &gt; some not in the same executable?<br>
&gt;                 &gt;             &gt;<br>
&gt;                 &gt;             &gt;<br>
&gt;                 &gt;             &gt; On Wed, Sep 11, 2013 at 6:56 PM,<br>
&gt;                 Geoffrey Mainland<br>
&gt;                 &gt;             &gt; &lt;<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;&gt;&gt; wrote:<br>
&gt;                 &gt;             &gt;<br>
&gt;                 &gt;             &gt;     We definitely have interop between<br>
&gt;                 the native<br>
&gt;                 &gt;             codegen and the LLVM<br>
&gt;                 &gt;             &gt;     back<br>
&gt;                 &gt;             &gt;     end now. Otherwise anyone who<br>
&gt;                 wanted to use the LLVM<br>
&gt;                 &gt;             back end<br>
&gt;                 &gt;             &gt;     would have<br>
&gt;                 &gt;             &gt;     to build GHC themselves. Interop<br>
&gt;                 means that users<br>
&gt;                 &gt;             can install the<br>
&gt;                 &gt;             &gt;     Haskell Platform and still use<br>
&gt;                 -fllvm when it makes<br>
&gt;                 &gt;             a performance<br>
&gt;                 &gt;             &gt;     difference.<br>
&gt;                 &gt;             &gt;<br>
&gt;                 &gt;             &gt;     Geoff<br>
&gt;                 &gt;             &gt;<br>
&gt;                 &gt;             &gt;     On 09/11/2013 07:59 PM, Johan<br>
&gt;                 Tibell wrote:<br>
&gt;                 &gt;             &gt;     &gt; Do nothing different than you&#39;re<br>
&gt;                 doing for 7.8, we<br>
&gt;                 &gt;             can sort it out<br>
&gt;                 &gt;             &gt;     &gt; later. Just put a comment on the<br>
&gt;                 primops saying<br>
&gt;                 &gt;             they&#39;re<br>
&gt;                 &gt;             &gt;     LLVM-only. See<br>
&gt;                 &gt;             &gt;     &gt; e.g.<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;<br>
&gt;                 &gt;<br>
&gt;                 <a href="https://github.com/ghc/ghc/blob/master/compiler/prelude/primops.txt.pp#L181" target="_blank">https://github.com/ghc/ghc/blob/master/compiler/prelude/primops.txt.pp#L181</a><br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt; for an example how to add docs<br>
&gt;                 to primops.<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt; I don&#39;t think we need interop<br>
&gt;                 between the native<br>
&gt;                 &gt;             and the LLVM<br>
&gt;                 &gt;             &gt;     &gt; backends. We don&#39;t have that now<br>
&gt;                 do we (i.e. they<br>
&gt;                 &gt;             use different<br>
&gt;                 &gt;             &gt;     &gt; calling conventions).<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt; On Wed, Sep 11, 2013 at 4:51 PM,<br>
&gt;                 Geoffrey Mainland<br>
&gt;                 &gt;             &gt;     &gt; &lt;<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;<br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a> &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;&gt;<br>
&gt;                 &gt;             &gt;     &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;<br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a> &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;&gt;&gt;&gt; wrote:<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;     On 09/11/2013 07:44 PM,<br>
&gt;                 Johan Tibell wrote:<br>
&gt;                 &gt;             &gt;     &gt;     &gt; On Wed, Sep 11, 2013 at<br>
&gt;                 4:40 PM, Geoffrey<br>
&gt;                 &gt;             Mainland<br>
&gt;                 &gt;             &gt;     &gt;     &lt;<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;<br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a> &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;&gt;<br>
&gt;                 &gt;             &gt;     &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;<br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a> &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;<br>
&gt;                 &gt;             &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a><br>
&gt;                 &lt;mailto:<a href="mailto:mainland@apeiron.net">mainland@apeiron.net</a>&gt;&gt;&gt;&gt;&gt; wrote:<br>
&gt;                 &gt;             &gt;     &gt;     &gt; &gt; Do you mean we need a<br>
&gt;                 reasonable emulation<br>
&gt;                 &gt;             of the SIMD<br>
&gt;                 &gt;             &gt;     primops for<br>
&gt;                 &gt;             &gt;     &gt;     &gt; &gt; the native codegen?<br>
&gt;                 &gt;             &gt;     &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;     &gt; Yes. Reasonable in the<br>
&gt;                 sense that it<br>
&gt;                 &gt;             computes the right<br>
&gt;                 &gt;             &gt;     result.<br>
&gt;                 &gt;             &gt;     &gt;     I can<br>
&gt;                 &gt;             &gt;     &gt;     &gt; see that some code might<br>
&gt;                 still want to<br>
&gt;                 &gt;             #ifdef (if the<br>
&gt;                 &gt;             &gt;     fallback isn&#39;t<br>
&gt;                 &gt;             &gt;     &gt;     &gt; fast enough).<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;     Two implications of this<br>
&gt;                 requirement:<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;     1) There will not be SIMD in<br>
&gt;                 7.8. I just don&#39;t<br>
&gt;                 &gt;             have the<br>
&gt;                 &gt;             &gt;     time. In fact,<br>
&gt;                 &gt;             &gt;     &gt;     what SIMD support is there<br>
&gt;                 already will have<br>
&gt;                 &gt;             to be removed if we<br>
&gt;                 &gt;             &gt;     &gt;     cannot<br>
&gt;                 &gt;             &gt;     &gt;     live with LLVM-only SIMD<br>
&gt;                 primops.<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;     2) If we also require<br>
&gt;                 interop between the LLVM<br>
&gt;                 &gt;             back-end and<br>
&gt;                 &gt;             &gt;     the native<br>
&gt;                 &gt;             &gt;     &gt;     codegen, then we cannot pass<br>
&gt;                 any SIMD vectors in<br>
&gt;                 &gt;             &gt;     registers---they all<br>
&gt;                 &gt;             &gt;     &gt;     must be passed on the stack.<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;     My plan, as discussed with<br>
&gt;                 Simon PJ, is to not<br>
&gt;                 &gt;             support SIMD<br>
&gt;                 &gt;             &gt;     primops at<br>
&gt;                 &gt;             &gt;     &gt;     all with the native codegen.<br>
&gt;                 If there is a<br>
&gt;                 &gt;             strong feeling that<br>
&gt;                 &gt;             &gt;     &gt;     this *is<br>
&gt;                 &gt;             &gt;     &gt;     not* the way to go, the I<br>
&gt;                 need to know ASAP.<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;     Geoff<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;     &gt;<br>
&gt;                 &gt;             &gt;<br>
&gt;                 &gt;             &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;                 &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div>