Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: src/IceCfg.cpp

Issue 1838973005: Subzero. Liveness memory management. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceBitVector.h ('k') | src/IceDefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 85be8b9e46040b97dd0f0788bed327cfe888cfcc..b42f32645305491f665e38cb774f8311d1421cbc 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::livenessLightweight() {
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()) {
« no previous file with comments | « src/IceBitVector.h ('k') | src/IceDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698