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

Unified Diff: src/IceCfgNode.h

Issue 1318553003: Compute the loop nest depth of each CfgNode and weight Variables by it. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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/IceCfg.cpp ('k') | src/IceCfgNode.cpp » ('j') | src/IceCfgNode.cpp » ('J')
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 963638d0599428b2261aa5625f4ed05a969db0e9..bbfdae203bd14cb7e12a8adab238f5af51e0a962 100644
--- a/src/IceCfgNode.h
+++ b/src/IceCfgNode.h
@@ -46,6 +46,10 @@ public:
return ".L" + Func->getFunctionName() + "$" + getName();
}
+ void incrementLoopNestDepth() { ++LoopNestDepth; }
+ void setLoopNestDepth(SizeT NewDepth) { LoopNestDepth = NewDepth; }
+ SizeT getLoopNestDepth() const { return LoopNestDepth; }
+
/// The HasReturn flag indicates that this node contains a return
/// instruction and therefore needs an epilog.
void setHasReturn() { HasReturn = true; }
@@ -111,6 +115,7 @@ private:
SizeT Number; /// label index
Cfg::IdentifierIndexType NameIndex =
Cfg::IdentifierIndexInvalid; /// index into Cfg::NodeNames table
+ SizeT LoopNestDepth = 0; /// the loop nest depth of this node
bool HasReturn = false; /// does this block need an epilog?
bool NeedsPlacement = false;
bool NeedsAlignment = false; /// is sandboxing required?
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceCfgNode.cpp » ('j') | src/IceCfgNode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698