Simplify LiveIntervals::getApproximateInstructionCount().

This function is only used for a heuristic during -join-physregs. It
doesn't need floating point.

llvm-svn: 155554
This commit is contained in:
Jakob Stoklund Olesen 2012-04-25 16:32:23 +00:00
parent e64664e178
commit 60d660fe94
1 changed files with 1 additions and 2 deletions

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