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

Unified Diff: src/IceInst.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/IceCfgNode.cpp ('k') | src/IceLiveness.cpp » ('j') | src/IceOperand.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.cpp
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index 4b89eb77b0fa88f5f692f637a5ef892305b1a62b..1059a4785879bac695c57a76c394618d19c49e7e 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -203,7 +203,7 @@ bool Inst::liveness(InstNumberT InstNumber, LivenessBV &Live,
Operand *Src = getSrc(I);
SizeT NumVars = Src->getNumVars();
for (SizeT J = 0; J < NumVars; ++J, ++VarIndex) {
- const Variable *Var = Src->getVar(J);
jvoung (off chromium) 2015/08/28 20:31:45 any reason for this change?
ascull 2015/08/28 21:22:36 There was, but no longer. Done.
+ Variable *Var = Src->getVar(J);
SizeT VarNum = Liveness->getLiveIndex(Var->getIndex());
if (!Live[VarNum]) {
setLastUse(VarIndex);
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceLiveness.cpp » ('j') | src/IceOperand.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698