Skip to content
  • Arnold Schwaighofer's avatar
    IfConverter: Use TargetSchedule for instruction latencies · d2f96b91
    Arnold Schwaighofer authored
    For targets that have instruction itineraries this means no change. Targets
    that move over to the new schedule model will use be able the new schedule
    module for instruction latencies in the if-converter (the logic is such that if
    there is no itineary 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)
    
    radar://15077010
    
    llvm-svn: 191671
    d2f96b91
Loading