Simplify LiveIntervals::getApproximateInstructionCount().

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
This commit is contained in:
Jakob Stoklund Olesen 2012-04-25 16:32:23 +00:00
parent a62efd82cc
commit 50e1d84ba8

View File

@ -147,8 +147,7 @@ namespace llvm {
/// 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