<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><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=""><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"></blockquote></span>
In particular, the LoadLatency is used in defaultDefLatency:<br>
<br>
/// Return the default expected latency for a def based on it's opcode.<br>
unsigned TargetInstrInfo::defaultDefLatency(<br>
     const MCSchedModel &SchedModel, const MachineInstr *DefMI) const {<br>
  if (DefMI->isTransient())<br>
    return 0;<br>
  if (DefMI->mayLoad())<br>
    return SchedModel.LoadLatency;<br>
  if (isHighLatencyDef(DefMI->getOpcode()))<br>
    return SchedModel.HighLatency;<br>
  return 1;<br>
}<span class=""><font color="#888888"><br>
<br>
<br>
-Krzysztof<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</font></span></blockquote></div><br>I tried setting </div><div class="gmail_extra">let mayLoad = 1 {</div><div class="gmail_extra">  class InstrLD .... {</div><div class="gmail_extra">   }</div><div class="gmail_extra">} </div><div class="gmail_extra"><br></div><div class="gmail_extra">But that didn't seem to work. When I looked at the debug output the latency for the load instruction was set to 1.</div><div class="gmail_extra"><br></div><div class="gmail_extra">However when I changed load itinerary description in the schedule to</div><div class="gmail_extra"><br></div><div class="gmail_extra">def MyTargetItineraries :</div><div class="gmail_extra">    ..............</div><div class="gmail_extra">    InstrItinData<LD, [InstrStage<2, [BranchSlot, NonBranchSlot], 1>]>,</div><div class="gmail_extra">    ..............</div><div class="gmail_extra"><br clear="all"><div>That seem to produce correct latency in the debug output. </div><div><br></div><div>Do you know what could be the problem? Am I missing something? To give you a full disclosure, I'm using LLVM 3.5 and at the moment I can't switch to the latest version. </div><div><br></div><div>Any help is appreciated.</div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>R</div></div></div></div></div>
</div></div>