mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
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:
parent
a62efd82cc
commit
50e1d84ba8
@ -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
Block a user