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

Unified Diff: src/IceCfg.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 | « no previous file | src/IceCfg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.h
diff --git a/src/IceCfg.h b/src/IceCfg.h
index 42e6ef121c519417faf5393e42a74bf62728e4f5..490d1d065d7c46b0c5cd6abc59d5d9190a7047f6 100644
--- a/src/IceCfg.h
+++ b/src/IceCfg.h
@@ -202,6 +202,7 @@ public:
void shuffleNodes();
void localCSE();
void shortCircuitJumps();
+ void loopInvariantCodeMotion();
/// Scan allocas to determine whether we need to use a frame pointer.
/// If SortAndCombine == true, merge all the fixed-size allocas in the
@@ -215,7 +216,7 @@ public:
void doNopInsertion();
void genCode();
void genFrame();
- void computeLoopNestDepth();
+ void generateLoopInfo();
void livenessLightweight();
void liveness(LivenessMode Mode);
bool validateLiveness() const;
@@ -300,6 +301,7 @@ private:
uint32_t CombinedAlignment, InstList &Insts,
AllocaBaseVariableType BaseVariableType);
void findRematerializable();
+ CfgVector<Inst *> findLoopInvariantInstructions(SizeT LoopHeaderIndex);
GlobalContext *Ctx;
uint32_t SequenceNumber; /// output order for emission
@@ -330,7 +332,7 @@ private:
/// Globals required by this CFG. Mostly used for the profiler's globals.
std::unique_ptr<VariableDeclarationList> GlobalInits;
CfgVector<InstJumpTable *> JumpTables;
-
+ CfgUnorderedMap<SizeT, CfgVector<SizeT>> LoopInfo;
/// CurrentNode is maintained during dumping/emitting just for validating
/// Variable::DefNode. Normally, a traversal over CfgNodes maintains this, but
/// before global operations like register allocation, resetCurrentNode()
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698