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

Unified Diff: src/IceLoopAnalyzer.h

Issue 2138443002: Subzero: Loop Invariant Code Motion (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Address comments Created 4 years, 5 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/IceClFlags.def ('k') | src/IceLoopAnalyzer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceLoopAnalyzer.h
diff --git a/src/IceLoopAnalyzer.h b/src/IceLoopAnalyzer.h
index eaaad9862045b3a420e0ba2fb724f75e611b8751..73458fa46aa38ae47b7257b44124644167a19417 100644
--- a/src/IceLoopAnalyzer.h
+++ b/src/IceLoopAnalyzer.h
@@ -39,9 +39,10 @@ public:
// is bounded linear. ncbray suggests another algorithm which is linear in
// practice but not bounded linear. I think it also finds dominators.
// http://lenx.100871.net/papers/loop-SAS.pdf
- void computeLoopNestDepth();
+ CfgUnorderedMap<SizeT, CfgVector<SizeT>> getLoopInfo() { return Loops; }
private:
+ void computeLoopNestDepth();
using IndexT = uint32_t;
static constexpr IndexT UndefinedIndex = 0;
static constexpr IndexT FirstDefinedIndex = 1;
@@ -80,6 +81,8 @@ private:
void incrementLoopNestDepth();
bool hasSelfEdge() const;
+ CfgNode *getNode() { return BB; }
+
private:
CfgNode *BB;
NodeList::const_iterator Succ;
@@ -110,6 +113,8 @@ private:
/// The number of nodes which have been marked deleted. This is used to track
/// when the iteration should end.
LoopNodePtrList::size_type NumDeletedNodes = 0;
+ /// Detailed loop information
+ CfgUnorderedMap<SizeT, CfgVector<SizeT>> Loops;
};
} // end of namespace Ice
« no previous file with comments | « src/IceClFlags.def ('k') | src/IceLoopAnalyzer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698