summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-09-30 15:28:56 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-09-30 15:28:56 +0000
commitd2f96b91ca3c32ebe4ad3a4b75132a54bb74a0b2 (patch)
tree9f68e64a0bc785211a70f5a39696d6843f5703f3 /llvm/lib/Target/ARM/ARMBaseInstrInfo.h
parente693181c101bedfd8ef2489de2d06af5eba9b069 (diff)
downloadbcm5719-llvm-d2f96b91ca3c32ebe4ad3a4b75132a54bb74a0b2.tar.gz
bcm5719-llvm-d2f96b91ca3c32ebe4ad3a4b75132a54bb74a0b2.zip
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 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
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseInstrInfo.h')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseInstrInfo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
index 96f8637d7b3..8ab06fd8c22 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
@@ -264,6 +264,8 @@ private:
const MCInstrDesc &UseMCID,
unsigned UseIdx, unsigned UseAlign) const;
+ unsigned getPredicationCost(const MachineInstr *MI) const;
+
unsigned getInstrLatency(const InstrItineraryData *ItinData,
const MachineInstr *MI,
unsigned *PredCost = 0) const;
OpenPOWER on IntegriCloud