diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-26 22:36:09 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-26 22:36:09 +0000 |
commit | e4f3317cdaacdf5dadbcf0afb4940af311588e19 (patch) | |
tree | 2597bbff96de0edc9e312fa906477136fb0cdc3d /llvm/lib/CodeGen/LiveRangeEdit.h | |
parent | 260fa289df07bed3b8531f20919596248b66d45f (diff) | |
download | bcm5719-llvm-e4f3317cdaacdf5dadbcf0afb4940af311588e19.tar.gz bcm5719-llvm-e4f3317cdaacdf5dadbcf0afb4940af311588e19.zip |
After splitting, compute connected components of all new registers, not just for
the remainder register.
Example:
bb0:
x = 1
bb1:
use(x)
...
x = 2
jump bb1
When x is isolated in bb1, the inner part breaks into two components, x1 and x2:
bb0:
x0 = 1
bb1:
x1 = x0
use(x1)
...
x2 = 2
x0 = x2
jump bb1
llvm-svn: 117408
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.h')
-rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.h b/llvm/lib/CodeGen/LiveRangeEdit.h index d6ba256aee4..3230a2e9fcd 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.h +++ b/llvm/lib/CodeGen/LiveRangeEdit.h @@ -77,6 +77,8 @@ public: typedef SmallVectorImpl<LiveInterval*>::const_iterator iterator; iterator begin() const { return newRegs_.begin()+firstNew_; } iterator end() const { return newRegs_.end(); } + unsigned size() const { return newRegs_.size()-firstNew_; } + LiveInterval *get(unsigned idx) const { return newRegs_[idx-firstNew_]; } /// assignStackSlot - Ensure a stack slot is assigned to parent. /// @return the assigned stack slot number. |