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

Unified Diff: src/IceCfg.cpp

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/IceCfg.h ('k') | src/IceCfgNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 5797fdcaf6375139dc1dc611e27792fdbba838cf..d1a78b24b2c8c93d2edc4fc2a576ce6f4e22acbe 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -23,6 +23,7 @@
#include "IceGlobalInits.h"
#include "IceInst.h"
#include "IceLiveness.h"
+#include "IceLoopAnalyzer.h"
#include "IceOperand.h"
#include "IceTargetLowering.h"
@@ -462,10 +463,16 @@ void Cfg::genFrame() {
getTarget()->addEpilog(Node);
}
-// This is a lightweight version of live-range-end calculation. Marks
-// the last use of only those variables whose definition and uses are
-// completely with a single block. It is a quick single pass and
-// doesn't need to iterate until convergence.
+void Cfg::computeLoopNestDepth() {
+ TimerMarker T(TimerStack::TT_computeLoopNestDepth, this);
+ LoopAnalyzer LA(this);
+ LA.computeLoopNestDepth();
+}
+
+// This is a lightweight version of live-range-end calculation. Marks the last
+// use of only those variables whose definition and uses are completely with a
+// single block. It is a quick single pass and doesn't need to iterate until
+// convergence.
void Cfg::livenessLightweight() {
TimerMarker T(TimerStack::TT_livenessLightweight, this);
getVMetadata()->init(VMK_Uses);
@@ -606,12 +613,11 @@ bool Cfg::validateLiveness() const {
}
void Cfg::contractEmptyNodes() {
- // If we're decorating the asm output with register liveness info,
- // this information may become corrupted or incorrect after
- // contracting nodes that contain only redundant assignments. As
- // such, we disable this pass when DecorateAsm is specified. This
- // may make the resulting code look more branchy, but it should have
- // no effect on the register assignments.
+ // If we're decorating the asm output with register liveness info, this
+ // information may become corrupted or incorrect after contracting nodes that
+ // contain only redundant assignments. As such, we disable this pass when
+ // DecorateAsm is specified. This may make the resulting code look more
+ // branchy, but it should have no effect on the register assignments.
if (Ctx->getFlags().getDecorateAsm())
return;
for (CfgNode *Node : Nodes) {
« no previous file with comments | « src/IceCfg.h ('k') | src/IceCfgNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698