Chromium Code Reviews

Unified Diff: src/IceCfgNode.h

Issue 1027933002: Subzero: Prune unreachable nodes after constructing the Cfg. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceCfgNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.h
diff --git a/src/IceCfgNode.h b/src/IceCfgNode.h
index 3b5aff343ac7063888ca749a3c0ee62856376706..e4fe2f9acdff15e93deb0b4ce947fde16b49670b 100644
--- a/src/IceCfgNode.h
+++ b/src/IceCfgNode.h
@@ -33,6 +33,7 @@ public:
// Access the label number and name for this node.
SizeT getIndex() const { return Number; }
+ void resetIndex(SizeT NewNumber) { Number = NewNumber; }
IceString getName() const;
void setName(const IceString &NewName) {
// Make sure that the name can only be set once.
@@ -70,6 +71,7 @@ public:
// Add a predecessor edge to the InEdges list for each of this
// node's successors.
void computePredecessors();
+ void computeSuccessors();
CfgNode *splitIncomingEdge(CfgNode *Pred, SizeT InEdgeIndex);
void placePhiLoads();
@@ -92,7 +94,7 @@ public:
private:
CfgNode(Cfg *Func, SizeT LabelIndex);
Cfg *const Func;
- const SizeT Number; // label index
+ SizeT Number; // label index
Cfg::IdentifierIndexType NameIndex; // index into Cfg::NodeNames table
bool HasReturn; // does this block need an epilog?
bool NeedsPlacement;
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceCfgNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine