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

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: 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/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index afbbaf3c4cf15e16e68184838043034bd8a17c0c..f70a936c65e5e87ec61280759ceb7c6169307dd9 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.
jvoung (off chromium) 2015/09/01 18:56:18 Some new nodes are created later, but I suppose th
+ // TODO: currently only used for regalloc not expensive high level
Jim Stichnoth 2015/09/01 22:17:38 TODO(ascull,stichnot)
ascull 2015/09/03 19:52:38 Done.
+ // 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 livness to variable use
jvoung (off chromium) 2015/09/01 18:56:18 "livness" something sounds odd about "Loops must
Jim Stichnoth 2015/09/01 22:17:38 I think you mean "so variable use"?
ascull 2015/09/03 19:52:38 Done.
+ // weights are correct.
Func->renumberInstructions();
if (Func->hasError())
return;

Powered by Google App Engine
This is Rietveld 408576698