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

Unified Diff: src/IceCfgNode.cpp

Issue 1271923002: Subzero: Slight improvement to phi lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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') | no next file with comments »
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 f319041c6646103fa9d24367b44e214123b9707c..56991b6780cb881d9c71476cc7e88f64d84a1c87 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -580,6 +580,8 @@ bool CfgNode::liveness(Liveness *Liveness) {
Live |= Liveness->getLiveIn(Succ);
// Mark corresponding argument of phis in successor as live.
for (Inst &I : Succ->Phis) {
+ if (I.isDeleted())
+ continue;
auto Phi = llvm::dyn_cast<InstPhi>(&I);
Phi->livenessPhiOperand(Live, this, Liveness);
}
@@ -720,7 +722,8 @@ void CfgNode::livenessAddIntervals(Liveness *Liveness, InstNumberT FirstInstNum,
for (int i = LiveInAndOut.find_first(); i != -1;
i = LiveInAndOut.find_next(i)) {
Variable *Var = Liveness->getVariable(i, this);
- Var->addLiveRange(FirstInstNum, LastInstNum + 1, 1);
+ if (Liveness->getRangeMask(Var->getIndex()))
+ Var->addLiveRange(FirstInstNum, LastInstNum + 1, 1);
}
}
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698