[llvm-commits] [llvm] r155554 - /llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Apr 25 09:32:23 PDT 2012


Author: stoklund
Date: Wed Apr 25 11:32:23 2012
New Revision: 155554

URL: http://llvm.org/viewvc/llvm-project?rev=155554&view=rev
Log:
Simplify LiveIntervals::getApproximateInstructionCount().

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

Modified:
    llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h

Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h?rev=155554&r1=155553&r2=155554&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Wed Apr 25 11:32:23 2012
@@ -147,8 +147,7 @@
     /// 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





More information about the llvm-commits mailing list