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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2010-10-01 22:45:50 +00:00
parent 6314ef9e81
commit e3cc84a43d
6 changed files with 67 additions and 42 deletions

View File

@@ -312,15 +312,17 @@ public:
const MachineFunction &MF) const;
virtual bool isProfitableToIfCvt(MachineBasicBlock &MBB,
unsigned NumInstrs, float Prob) const;
unsigned NumInstrs,
float Prob, float Confidence) const;
virtual bool isProfitableToIfCvt(MachineBasicBlock &TMBB,unsigned NumT,
MachineBasicBlock &FMBB,unsigned NumF,
float Probability) const;
float Probability, float Confidence) const;
virtual bool isProfitableToDupForIfCvt(MachineBasicBlock &MBB,
unsigned NumInstrs,
float Probability) const {
float Probability,
float Confidence) const {
return NumInstrs && NumInstrs == 1;
}