Subzero. Liveness memory management.

Creates a local arena allocator for holding liveness data structures.

BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4366
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/1838973005 .
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 85be8b9..b42f326 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -28,6 +28,9 @@
 #include "IceOperand.h"
 #include "IceTargetLowering.h"
 
+#include <memory>
+#include <utility>
+
 namespace Ice {
 
 Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber)
@@ -819,9 +822,14 @@
 
 void Cfg::liveness(LivenessMode Mode) {
   TimerMarker T(TimerStack::TT_liveness, this);
-  Live.reset(new Liveness(this, Mode));
+  // Destroying the previous (if any) Liveness information clears the Liveness
+  // allocator TLS pointer.
+  Live = nullptr;
+  Live = Liveness::create(this, Mode);
+
   getVMetadata()->init(VMK_Uses);
   Live->init();
+
   // Initialize with all nodes needing to be processed.
   BitVector NeedToProcess(Nodes.size(), true);
   while (NeedToProcess.any()) {