forked from OSchip/llvm-project
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:
parent
e64664e178
commit
60d660fe94
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue