diff options
author | Owen Anderson <resistor@mac.com> | 2008-12-28 21:57:02 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-12-28 21:57:02 +0000 |
commit | 169d4080277c71548de52b54c8a79f99694351c6 (patch) | |
tree | dd2f0ffa15335ebef92b47c7ebb091f87f3292e3 /include | |
parent | 60d4f6ded236d05896d3615396c694a19b750334 (diff) | |
download | external_llvm-169d4080277c71548de52b54c8a79f99694351c6.zip external_llvm-169d4080277c71548de52b54c8a79f99694351c6.tar.gz external_llvm-169d4080277c71548de52b54c8a79f99694351c6.tar.bz2 |
Forgot to commit this file.
Add a clear() method to remove all ranges and value numbers for a live interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61459 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 880d541..86aada3 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/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. /// |