summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-12-28 21:57:02 +0000
committerOwen Anderson <resistor@mac.com>2008-12-28 21:57:02 +0000
commit4213188c7543af37414dee3702e123b36694ab2a (patch)
tree766215d2d24cf8ef237a961a0f1b033a21a78e95 /llvm/include
parent37751bb9d9c17d6048766c52d631718d9dd47bfc (diff)
downloadbcm5719-llvm-4213188c7543af37414dee3702e123b36694ab2a.tar.gz
bcm5719-llvm-4213188c7543af37414dee3702e123b36694ab2a.zip
Forgot to commit this file.
Add a clear() method to remove all ranges and value numbers for a live interval. llvm-svn: 61459
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/CodeGen/LiveInterval.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/LiveInterval.h b/llvm/include/llvm/CodeGen/LiveInterval.h
index 880d541e50b..86aada3b80a 100644
--- a/llvm/include/llvm/CodeGen/LiveInterval.h
+++ b/llvm/include/llvm/CodeGen/LiveInterval.h
@@ -145,6 +145,16 @@ namespace llvm {
while (I->end <= Pos) ++I;
return I;
}
+
+ void clear() {
+ while (!valnos.empty()) {
+ VNInfo *VNI = valnos.back();
+ valnos.pop_back();
+ VNI->~VNInfo();
+ }
+
+ ranges.clear();
+ }
/// isStackSlot - Return true if this is a stack slot interval.
///
OpenPOWER on IntegriCloud