summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-04-25 16:32:23 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-04-25 16:32:23 +0000
commit60d660fe940e42d7d7ed28ea2f90a33605f31bd4 (patch)
treefeca17c647efc31dd57e93f74ea86031f825e10f /llvm
parente64664e1786c8a581be766db36f866f8e56ef98a (diff)
downloadbcm5719-llvm-60d660fe940e42d7d7ed28ea2f90a33605f31bd4.tar.gz
bcm5719-llvm-60d660fe940e42d7d7ed28ea2f90a33605f31bd4.zip
Simplify LiveIntervals::getApproximateInstructionCount().
This function is only used for a heuristic during -join-physregs. It doesn't need floating point. llvm-svn: 155554
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
index 9329338976e..c3c6e2d15cb 100644
--- a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
+++ b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
@@ -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
OpenPOWER on IntegriCloud