mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Part one of switching to using a more sane heuristic for determining if-conversion profitability.
Rather than having arbitrary cutoffs, actually try to cost model the conversion. For now, the constants are tuned to more or less match our existing behavior, but these will be changed to reflect realistic values as this work proceeds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114973 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -312,13 +312,15 @@ public:
|
||||
const MachineFunction &MF) const;
|
||||
|
||||
virtual bool isProfitableToIfCvt(MachineBasicBlock &MBB,
|
||||
unsigned NumInstrs) const;
|
||||
unsigned NumInstrs, float Prob) const;
|
||||
|
||||
virtual bool isProfitableToIfCvt(MachineBasicBlock &TMBB,unsigned NumT,
|
||||
MachineBasicBlock &FMBB,unsigned NumF) const;
|
||||
MachineBasicBlock &FMBB,unsigned NumF,
|
||||
float Probability) const;
|
||||
|
||||
virtual bool isProfitableToDupForIfCvt(MachineBasicBlock &MBB,
|
||||
unsigned NumInstrs) const {
|
||||
unsigned NumInstrs,
|
||||
float Probability) const {
|
||||
return NumInstrs && NumInstrs == 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user