Subzero: Pull the node name out of the node structure. Instead, non-empty node names are kept in a single vector in the Cfg object. This is toward the goal of pulling non-POD fields out of the CfgNode class so that CfgNode can be arena-allocated and not leak memory. Also, actual setting of the node name is now guarded by ALLOW_DUMP. BUG= none R=jvoung@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/787333005
diff --git a/src/IceConverter.cpp b/src/IceConverter.cpp index e06e290..a8148f9 100644 --- a/src/IceConverter.cpp +++ b/src/IceConverter.cpp
@@ -156,7 +156,9 @@ Ice::CfgNode *mapBasicBlockToNode(const BasicBlock *BB) { if (NodeMap.find(BB) == NodeMap.end()) { - NodeMap[BB] = Func->makeNode(BB->getName()); + NodeMap[BB] = Func->makeNode(); + if (ALLOW_DUMP) + NodeMap[BB]->setName(BB->getName()); } return NodeMap[BB]; }