summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveIntervalAnalysis.h
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
commit50e1d84ba8efc1973137c65e0b0e048ecf8cf5d6 (patch)
tree843b9edeb4572920a0e44fd8a4558a61d9fe1cd1 /include/llvm/CodeGen/LiveIntervalAnalysis.h
parenta62efd82ccb979df9e7b8f99913c83d698a6994e (diff)
downloadllvm-50e1d84ba8efc1973137c65e0b0e048ecf8cf5d6.tar.gz
llvm-50e1d84ba8efc1973137c65e0b0e048ecf8cf5d6.tar.bz2
llvm-50e1d84ba8efc1973137c65e0b0e048ecf8cf5d6.tar.xz
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
Diffstat (limited to 'include/llvm/CodeGen/LiveIntervalAnalysis.h')
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h
index 9329338976..c3c6e2d15c 100644
--- a/include/llvm/CodeGen/LiveIntervalAnalysis.h
+++ b/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