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

Unified Diff: src/IceCfgNode.cpp

Issue 2172313002: Subzero : Live Range Splitting after initial Register Allocation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 4 years, 5 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/IceClFlags.def » ('j') | src/IceClFlags.def » ('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 c92c9eb49af6f43dedd41739cde1cee4f83db4b0..eb0bcfc8aa6e1c5764a8938695336b51c28397f6 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -459,8 +459,10 @@ void CfgNode::advancedPhiLowering() {
// Undo the effect of the phi instruction on this node's live-in set by
// marking the phi dest variable as live on entry.
SizeT VarNum = Func->getLiveness()->getLiveIndex(Dest->getIndex());
- assert(!Func->getLiveness()->getLiveIn(this)[VarNum]);
- Func->getLiveness()->getLiveIn(this)[VarNum] = true;
+ if (Func->getLiveness()->getLiveIn(this).size() >= VarNum) {
Jim Stichnoth 2016/07/29 17:04:06 Shouldn't the '>=' be '>' ? In any case, I think
manasijm 2016/08/01 22:20:03 Done.
+ assert(!Func->getLiveness()->getLiveIn(this)[VarNum]);
+ Func->getLiveness()->getLiveIn(this)[VarNum] = true;
+ }
Phi->setDeleted();
}
}
@@ -867,15 +869,15 @@ void CfgNode::livenessAddIntervals(Liveness *Liveness, InstNumberT FirstInstNum,
Variable *Var = Liveness->getVariable(i, this);
if (LB > LE) {
- Var->addLiveRange(FirstInstNum, LE);
- Var->addLiveRange(LB, LastInstNum + 1);
+ Var->addLiveRange(FirstInstNum, LE, this);
+ Var->addLiveRange(LB, LastInstNum + 1, this);
// 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);
+ Var->addLiveRange(LB, LE, this);
}
if (i == i1)
++IBB;
@@ -887,7 +889,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);
+ Var->addLiveRange(FirstInstNum, LastInstNum + 1, this);
}
}
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceClFlags.def » ('j') | src/IceClFlags.def » ('J')

Powered by Google App Engine
This is Rietveld 408576698