Reuse live interval union between functions. This saves a bit of compile time
when compiling many small functions.

llvm-svn: 129321
diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.h b/llvm/lib/CodeGen/LiveIntervalUnion.h
index 90d4aaf..c83578e 100644
--- a/llvm/lib/CodeGen/LiveIntervalUnion.h
+++ b/llvm/lib/CodeGen/LiveIntervalUnion.h
@@ -95,6 +95,9 @@
   // Remove a live virtual register's segments from this union.
   void extract(LiveInterval &VirtReg);
 
+  // Remove all inserted virtual registers.
+  void clear() { Segments.clear(); ++Tag; }
+
   // Print union, using TRI to translate register names
   void print(raw_ostream &OS, const TargetRegisterInfo *TRI) const;