[llvm-dev] DFAPacketizer, Scheduling and LoadLatency
Krzysztof Parzyszek via llvm-dev
llvm-dev at lists.llvm.org
Thu Jan 7 08:52:47 PST 2016
On 1/6/2016 1:59 PM, Rail Shafigulin wrote:
>
>
> let Itinerary = l_lwz in
> def LWZ : LOADi32<0x1, "l.lwz", load>;
>
> My instruction itinerary data looks like the following
>
> InstrItinData<l_lwz , [InstrStage<1, [Slot0, Slot1]>]>,
>
> and my LoadLatency is set to 2.
>
> 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?
I'm not sure exactly what's going on in your case. You can try to see
if this is the function that causes the "2" to be returned.
unsigned TargetInstrInfo::
getInstrLatency(const InstrItineraryData *ItinData,
const MachineInstr *MI,
unsigned *PredCost) const {
// Default to one cycle for no itinerary. However, an "empty"
itinerary may
// still have a MinLatency property, which getStageLatency checks.
if (!ItinData)
return MI->mayLoad() ? 2 : 1;
return ItinData->getStageLatency(MI->getDesc().getSchedClass());
}
-Krzysztof
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-dev
mailing list