summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-10-01 22:45:50 +0000
committerOwen Anderson <resistor@mac.com>2010-10-01 22:45:50 +0000
commitf31f33ea890514a6fbde5f5d2fc536881c532e9a (patch)
treef9c861e9726df39b38179c34915ffc8535e1713d /llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
parent517abb44a2c390e7e321cf38a316948b57358a5f (diff)
downloadbcm5719-llvm-f31f33ea890514a6fbde5f5d2fc536881c532e9a.tar.gz
bcm5719-llvm-f31f33ea890514a6fbde5f5d2fc536881c532e9a.zip
Thread the determination of branch prediction hit rates back through the if-conversion heuristic APIs. For now,
stick with a constant estimate of 90% (branch predictors are good!), but we might find that we want to provide more nuanced estimates in the future. llvm-svn: 115364
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb2InstrInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/Thumb2InstrInfo.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp b/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
index a79b4ae4b31..0a0f3146efd 100644
--- a/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
+++ b/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
@@ -44,19 +44,22 @@ unsigned Thumb2InstrInfo::getUnindexedOpcode(unsigned Opc) const {
bool Thumb2InstrInfo::isProfitableToIfCvt(MachineBasicBlock &MBB,
unsigned NumInstrs,
- float Prediction) const {
+ float Prediction,
+ float Confidence) const {
if (!OldT2IfCvt)
- return ARMBaseInstrInfo::isProfitableToIfCvt(MBB, NumInstrs, Prediction);
+ return ARMBaseInstrInfo::isProfitableToIfCvt(MBB, NumInstrs,
+ Prediction, Confidence);
return NumInstrs && NumInstrs <= 3;
}
bool Thumb2InstrInfo::
isProfitableToIfCvt(MachineBasicBlock &TMBB, unsigned NumT,
MachineBasicBlock &FMBB, unsigned NumF,
- float Prediction) const {
+ float Prediction, float Confidence) const {
if (!OldT2IfCvt)
return ARMBaseInstrInfo::isProfitableToIfCvt(TMBB, NumT,
- FMBB, NumF, Prediction);
+ FMBB, NumF,
+ Prediction, Confidence);
// FIXME: Catch optimization such as:
// r0 = movne
OpenPOWER on IntegriCloud