This function is only used for a heuristic during -join-physregs. It
doesn't need floating point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155554
91177308-0d34-0410-b5e6-
96231b3b80d8
/// getApproximateInstructionCount - computes an estimate of the number
/// of instructions in a given LiveInterval.
unsigned getApproximateInstructionCount(LiveInterval& I) {
- double IntervalPercentage = getScaledIntervalSize(I) / 1000.0;
- return (unsigned)(IntervalPercentage * indexes_->getFunctionSize());
+ return I.getSize()/SlotIndex::InstrDist;
}
// Interval creation