From c2ec2f20f946827437910e749a3f25ebd7f5f315 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 24 Jun 2008 00:08:35 +0000 Subject: [PATCH] Use InstrSlots::NUM rather than pre-dividing by four. Also, mark this const. llvm-svn: 52659 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h index 92c3b844c9cf..32f157f0c1d2 100644 --- a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -172,10 +172,10 @@ namespace llvm { /// 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