<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 10:02 AM, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, Feb 22, 2015 at 3:06 PM, Ben Widawsky <<a href="mailto:ben@bwidawsk.net">ben@bwidawsk.net</a>> wrote:<br>
> On Sun, Feb 08, 2015 at 02:48:02PM -0800, Matt Turner wrote:<br>
>> On Sun, Feb 8, 2015 at 1:59 PM, Ben Widawsky<br>
>> <<a href="mailto:benjamin.widawsky@intel.com">benjamin.widawsky@intel.com</a>> wrote:<br>
</span><span class="">>> > +   /* The LOAD_PAYLOAD helper seems like the obvious choice here. However, it<br>
>> > +    * requires a lot of information about the sources to appropriately figure<br>
>> > +    * out the number of registers needed to be used. Given this stage in our<br>
>> > +    * optimization, we may not have the appropriate GRFs required by<br>
>> > +    * LOAD_PAYLOAD at this point (copy propogation). Therefore, we need to<br>
>><br>
>> typo: propagation<br>
>><br>
>> I'm not sure what "w e may not have the appropriate GRFs ..." means?<br>
><br>
> Here is the relevant part of the original IRC conversation:<br>
> jekstrand       [08:52:30] No, the problem is uniforms and immediates.<br>
> jekstrand       [08:52:58] They can't go in a LOAD_PAYLOAD directly because we don't know how many destination registers they take up.<br>
> jekstrand       [08:54:16] for LOAD_PAYLOAD to work, we need more information than a regular instruction.  We need to know how many destination registers a given source takes up, we need to know whether it needs to use the second-half quarter control for the MOV that gets generated, etc.<br>
> jekstrand       [08:54:34] Using GRF sources more-or-less gives us this.  Immediates don't.<br>
> bwidawks        [08:54:55] right - this is what confuses me though... the immediates seem to already be there.<br>
> jekstrand       [08:55:38] Right.  The immediates can get there through copy-propagation and that's fine.  However, they're not there when it's created.<br>
> jekstrand       [08:55:43] It's all a mess<br>
><br>
> Do you have a preferred way to state this concisely?<br>
<br>
</span>Heh, I'm not sure I understand LOAD_PAYLOAD anymore. The comment's<br>
probably fine as-is.<span class=""><br></span></blockquote><div><br></div><div>Sorry, that's my fault.  I made LOAD_PAYLOAD a disaster of complicated details that was probably way too fragile to begin with.  Curro's working on getting that cleaned up and I think he's got good ideas for doing so.<br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
>> > @@ -3609,6 +3709,7 @@ fs_visitor::optimize()<br>
>> >        OPT(opt_peephole_predicated_break);<br>
>> >        OPT(opt_cmod_propagation);<br>
>> >        OPT(dead_code_eliminate);<br>
>> > +      OPT(opt_sampler_eot);<br>
>><br>
>> Do you think we really need to do this in the optimization loop?<br>
>><br>
>> I don't expect this to allow other optimization passes to make<br>
>> additional progress, and we can obviously do it successfully only<br>
>> once. I suspect we can do it after the optimization loop.<br>
>><br>
><br>
> It's possible I didn't quite spot where you want me to put the optimization. I<br>
> think that the way the code works right now, that will not work. The<br>
> optimization is depending on DCE to kill off the only LOAD_PAYLOAD and it's<br>
> corresponding MOVs. I agree that it is an optimization that can only occur once,<br>
> and generally it doesn't belong in the progress loop though.<br>
<br>
</span>Ah, sorry. I'd probably do it between the end of the optimization loop<br>
and the call to lower_load_payload().<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div></div>