summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-06-24 00:08:35 +0000
committerOwen Anderson <resistor@mac.com>2008-06-24 00:08:35 +0000
commitc2ec2f20f946827437910e749a3f25ebd7f5f315 (patch)
treee0dd92cb44430f7e8894f97f1e9146e4424336f8
parent6269cc1ced737ed7370d8d2b11e7066f8900c8f1 (diff)
downloadbcm5719-llvm-c2ec2f20f946827437910e749a3f25ebd7f5f315.tar.gz
bcm5719-llvm-c2ec2f20f946827437910e749a3f25ebd7f5f315.zip
Use InstrSlots::NUM rather than pre-dividing by four. Also, mark this const.
llvm-svn: 52659
-rw-r--r--llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
index 92c3b844c9c..32f157f0c1d 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
OpenPOWER on IntegriCloud