[llvm-commits] [llvm] r52659 -	/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h
    Owen Anderson 
    resistor at mac.com
       
    Mon Jun 23 17:08:35 PDT 2008
    
    
  
Author: resistor
Date: Mon Jun 23 19:08:35 2008
New Revision: 52659
URL: http://llvm.org/viewvc/llvm-project?rev=52659&view=rev
Log:
Use InstrSlots::NUM rather than pre-dividing by four.  Also, mark this const.
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=52659&r1=52658&r2=52659&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Mon Jun 23 19:08:35 2008
@@ -172,10 +172,10 @@
     /// getIntervalSize - get the size of an interval in "units,"
     /// where every function is composed of one thousand units.  This
     /// measure scales properly with empty index slots in the function.
-    unsigned getScaledIntervalSize(LiveInterval& I) {
+    unsigned getScaledIntervalSize(LiveInterval& I) const {
       // Factor of 250 comes from 1000 units per function divided
       // by four slots per instruction.
-      return (250 * I.getSize()) / i2miMap_.size();
+      return (1000 / InstrSlots::NUM * I.getSize()) / i2miMap_.size();
     }
 
     /// getMBBFromIndex - given an index in any instruction of an
    
    
More information about the llvm-commits
mailing list