aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.h
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-21 20:19:10 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-21 20:19:10 +0000
commit6b4edbaaf9021e0434f0ce0c3724eb43ed41b770 (patch)
treea37baf95e09c52fae7e10e2f034303b4d0d1b4f9 /lib/CodeGen/LiveIntervalAnalysis.h
parent595bb97fc745172204980f0addcabc76f5f9f843 (diff)
Change weight into a float so that we can take into account the
nesting level when computing it. Right now the allocator uses: w = sum_over_defs_uses( 10 ^ nesting level ); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.h')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.h b/lib/CodeGen/LiveIntervalAnalysis.h
index 7ef2e78ea6..cecfbbadbd 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.h
+++ b/lib/CodeGen/LiveIntervalAnalysis.h
@@ -38,8 +38,9 @@ namespace llvm {
typedef std::pair<unsigned, unsigned> Range;
typedef std::vector<Range> Ranges;
unsigned reg; // the register of this interval
- unsigned weight; // weight of this interval (number of uses)
- Ranges ranges; // the ranges this register is valid
+ float weight; // weight of this interval (number of uses
+ // * 10^loopDepth)
+ Ranges ranges; // the ranges this register is valid
Interval(unsigned r);