diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-09-13 23:29:09 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-09-13 23:29:09 +0000 |
commit | 9ca2aeb2d223d11fd01b0bb8f13fe7f3a969714d (patch) | |
tree | 8a51055c81939d3cd8055296ced719a08f830218 /lib/CodeGen/SplitKit.h | |
parent | 8466fa1842ad4f2d6fadcf5c23c15319ae96b972 (diff) | |
download | llvm-9ca2aeb2d223d11fd01b0bb8f13fe7f3a969714d.tar.gz llvm-9ca2aeb2d223d11fd01b0bb8f13fe7f3a969714d.tar.bz2 llvm-9ca2aeb2d223d11fd01b0bb8f13fe7f3a969714d.tar.xz |
Allow LiveIntervalMap to be reused by resetting the current live interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r-- | lib/CodeGen/SplitKit.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h index ddef7461dc..b80443ee4b 100644 --- a/lib/CodeGen/SplitKit.h +++ b/lib/CodeGen/SplitKit.h @@ -151,7 +151,7 @@ class LiveIntervalMap { const LiveInterval &parentli_; // The child interval's values are fully contained inside parentli_ values. - LiveInterval &li_; + LiveInterval *li_; typedef DenseMap<const VNInfo*, VNInfo*> ValueMap; @@ -172,9 +172,14 @@ class LiveIntervalMap { public: LiveIntervalMap(LiveIntervals &lis, - const LiveInterval &parentli, - LiveInterval &li) - : lis_(lis), parentli_(parentli), li_(li) {} + const LiveInterval &parentli) + : lis_(lis), parentli_(parentli), li_(0) {} + + /// reset - clear all data structures and start a new live interval. + void reset(LiveInterval *); + + /// getLI - return the current live interval. + LiveInterval *getLI() const { return li_; } /// defValue - define a value in li_ from the parentli_ value VNI and Idx. /// Idx does not have to be ParentVNI->def, but it must be contained within |