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

Unified Diff: src/IceTargetLoweringX86BaseImpl.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/IceSwitchLowering.cpp ('k') | src/IceTimerTree.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index afbbaf3c4cf15e16e68184838043034bd8a17c0c..13730e19673f00572853767c12f04b6807629724 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -327,6 +327,13 @@ template <class Machine> void TargetX86Base<Machine>::translateO2() {
Func->dump("After Phi lowering");
}
+ // Run this early so it can be used to focus optimizations on potentially hot
+ // code.
+ // TODO(stichnot,ascull): currently only used for regalloc not expensive high
+ // level optimizations which could be focused on potentially hot code.
+ Func->computeLoopNestDepth();
+ Func->dump("After loop nest depth analysis");
+
// Address mode optimization.
Func->getVMetadata()->init(VMK_SingleDefs);
Func->doAddressOpt();
@@ -367,8 +374,9 @@ template <class Machine> void TargetX86Base<Machine>::translateO2() {
return;
Func->dump("After x86 codegen");
- // Register allocation. This requires instruction renumbering and full
- // liveness analysis.
+ // Register allocation. This requires instruction renumbering and full
+ // liveness analysis. Loops must be identified before liveness so variable
+ // use weights are correct.
Func->renumberInstructions();
if (Func->hasError())
return;
« no previous file with comments | « src/IceSwitchLowering.cpp ('k') | src/IceTimerTree.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698