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

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: calculate -> compute (consistency) Created 5 years, 4 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
Index: src/IceCfgNode.h
diff --git a/src/IceCfgNode.h b/src/IceCfgNode.h
index 963638d0599428b2261aa5625f4ed05a969db0e9..e410c487407e45f116b735cb19c810f2b6d44d37 100644
--- a/src/IceCfgNode.h
+++ b/src/IceCfgNode.h
@@ -46,6 +46,9 @@ public:
return ".L" + Func->getFunctionName() + "$" + getName();
}
+ void incrementLoopNestDepth() { ++LoopNestDepth; }
+ uint32_t 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 +114,7 @@ private:
SizeT Number; /// label index
Cfg::IdentifierIndexType NameIndex =
Cfg::IdentifierIndexInvalid; /// index into Cfg::NodeNames table
+ uint32_t LoopNestDepth = 0; /// the loop nest depth of this node
Jim Stichnoth 2015/09/01 22:17:37 Maybe the uint32_t should be SizeT?
ascull 2015/09/03 19:52:37 Done.
bool HasReturn = false; /// does this block need an epilog?
bool NeedsPlacement = false;
bool NeedsAlignment = false; /// is sandboxing required?

Powered by Google App Engine
This is Rietveld 408576698