From 27e4666c20650f2b10d93b98b7a0625a363df9df Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 27 Apr 2009 17:35:19 +0000 Subject: [PATCH] Also delete last unused val#. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70212 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveInterval.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index 0450c355dce..c34b628d5fe 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -629,6 +629,12 @@ void LiveInterval::MergeInClobberRanges(const LiveInterval &Clobbers, UnusedValNo = 0; } } + + if (UnusedValNo) { + // Delete the last unused val#. + valnos.pop_back(); + UnusedValNo->~VNInfo(); + } } void LiveInterval::MergeInClobberRange(unsigned Start, unsigned End, -- 2.34.1