Arnold Schwaighofer
2013-Sep-30 19:30 UTC
[LLVMdev] Out of tree targets: Possibly additional API to implement for out of tree targets using the IfConverter
Hi all,
If you have an out of tree target and use the IfConverter be aware of a new API
call "getPredictationCost“ that you might want to implement:
After commit r191671:
IfConverter: Use TargetSchedule for instruction latencies
For targets that have instruction itineraries this means no change. Targets
that move over to the new schedule model will be able to use the new
schedule
module for instruction latencies in the if-converter (the logic is such that
if
there is no itinerary we will use the new sched model for the latencies).
Before, we queried "TTI->getInstructionLatency()" for the
instruction latency
and the extra prediction cost. Now, we query the TargetSchedule abstraction
for
the instruction latency and TargetInstrInfo for the extra predictation cost.
The
TargetSchedule abstraction will internally call
"TTI->getInstructionLatency" if
an itinerary exists, otherwise it will use the new schedule model.
ATTENTION: Out of tree targets!
(I will also send out an email later to LLVMDev)
This means, if your target implements
unsigned getInstrLatency(const InstrItineraryData *ItinData,
const MachineInstr *MI,
unsigned *PredCost);
and returns a value for "PredCost", you now also need to implement
unsigned getPredictationCost(const MachineInstr *MI);
(if your target uses the IfConversion.cpp pass)
Best,
Arnold
Seemingly Similar Threads
- [LLVMdev] Instruction Scheduling - migration from v3.1 to v3.2
- [LLVMdev] Machine LICM and cheap instructions?
- DFAPacketizer, Scheduling and LoadLatency
- Is addrspace info available during instruction scheduling?
- [LLVMdev] Build error fails at MachineInstr const* for the past two days
