<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 17, 2015 at 11:15 AM, Krzysztof Parzyszek <span dir="ltr"><<a href="mailto:kparzysz@codeaurora.org" target="_blank">kparzysz@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 11/17/2015 12:26 PM, Rail Shafigulin wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
I tried setting<br>
let mayLoad = 1 {<br>
   class InstrLD .... {<br>
    }<br>
}<br>
<br>
But that didn't seem to work. When I looked at the debug output the<br>
latency for the load instruction was set to 1.<br>
<br>
However when I changed load itinerary description in the schedule to<br>
<br>
def MyTargetItineraries :<br>
     ..............<br>
     InstrItinData<LD, [InstrStage<2, [BranchSlot, NonBranchSlot], 1>]>,<br>
     ..............<br>
<br>
That seem to produce correct latency in the debug output.<br>
<br>
Do you know what could be the problem? Am I missing something? To give<br>
you a full disclosure, I'm using LLVM 3.5 and at the moment I can't<br>
switch to the latest version.<br>
<br>
Any help is appreciated.<br>
</blockquote>
<br></span>
I think that the LoadLatency is used as a last resort when there is no itinerary available for a given instruction.  In your case, there is one and so the LoadLatency is ignored, and instead the latency from the itinerary is used.<div class=""><div class="h5"><br>
<br>
-Krzysztof<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br>
</div></div></blockquote></div><br>I had a chance to test this and I'm somewhat confused. Earlier we concluded that the connection between LoadLatency and a given instruction is through mayLoad variable. In other words an instruction will set its latency value to LoadLatency if mayLoad is set to 1. However this doesn't seem to be happening in my case. </div><div class="gmail_extra"><br></div><div class="gmail_extra">Here is my load instruction definition:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">class InstLD<bits<4> op, dag outs, dag ins, string asmstr, list<dag> pattern></div><div class="gmail_extra">  : InstEscala<outs, ins, asmstr, pattern> {</div><div class="gmail_extra">  let optype = 0b10;</div><div class="gmail_extra">  let opcode = op;</div><div class="gmail_extra">}</div><div><br></div><div><div>class LOAD<bits<4> subop, string asmstring, list<dag> pattern></div><div>  : InstLD<subop, (outs GPR:$rD), (ins MEMri:$src),</div><div>           !strconcat(asmstring, "\t$rD, $src"), pattern> {</div><div>  bits<5> rD;</div><div>  bits<21> src;</div><div><br></div><div>  let Inst{25-21} = rD;</div><div>  let Inst{20-0} = src;</div><div>}</div></div><div><br></div><div><div>class LOADi32<bits<4> subop, string asmstring, PatFrag opNode></div><div>  : LOAD<subop, asmstring, [(set (i32 GPR:$rD), (opNode ADDRri:$src))]>;</div></div><div><br></div><div><div>let Itinerary = l_lwz in</div><div>  def LWZ : LOADi32<0x1, "l.lwz", load>;</div></div><div><br></div><div>My instruction itinerary data looks like the following</div><div><br></div><div>InstrItinData<l_lwz    , [InstrStage<1, [Slot0, Slot1]>]>,<br></div><div><br></div><div>and my LoadLatency is set to 2.</div><div><br></div><div>As you can see mayLoad is never really set to 1 anywhere however it still seems to be using a LoadLatency of 2. What am I missing? <br></div><div><br></div><div>Any help is appreciated.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin<br></div>Software Engineer <br>Esencia Technologies<br></div></div></div></div>
</div></div>