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

Unified Diff: src/IceCfgNode.cpp

Issue 1312433004: Weight variables by their number of uses for register allocation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Count uses in VMetadata 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
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceInst.cpp » ('j') | src/IceInst.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.cpp
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp
index 6926722d576d6f9488fa8c13f875918ba2de5ea7..f0fae92af6de29990c3fd0fb42e16d76460dc83b 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -700,15 +700,15 @@ void CfgNode::livenessAddIntervals(Liveness *Liveness, InstNumberT FirstInstNum,
Variable *Var = Liveness->getVariable(i, this);
if (LB > LE) {
- Var->addLiveRange(FirstInstNum, LE, 1);
- Var->addLiveRange(LB, LastInstNum + 1, 1);
+ Var->addLiveRange(FirstInstNum, LE);
+ Var->addLiveRange(LB, LastInstNum + 1);
// Assert that Var is a global variable by checking that its
// liveness index is less than the number of globals. This
// ensures that the LiveInAndOut[] access is valid.
assert(i < Liveness->getNumGlobalVars());
LiveInAndOut[i] = false;
} else {
- Var->addLiveRange(LB, LE, 1);
+ Var->addLiveRange(LB, LE);
}
if (i == i1)
++IBB;
@@ -720,7 +720,7 @@ void CfgNode::livenessAddIntervals(Liveness *Liveness, InstNumberT FirstInstNum,
i = LiveInAndOut.find_next(i)) {
Variable *Var = Liveness->getVariable(i, this);
if (Liveness->getRangeMask(Var->getIndex()))
- Var->addLiveRange(FirstInstNum, LastInstNum + 1, 1);
+ Var->addLiveRange(FirstInstNum, LastInstNum + 1);
}
}
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceInst.cpp » ('j') | src/IceInst.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698