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

Unified Diff: src/IceInst.cpp

Issue 1271923002: Subzero: Slight improvement to phi lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a TODO 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.h » ('j') | no next file with comments »
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 900b408e65990c942144759585e80f3e314d9e8c..4b89eb77b0fa88f5f692f637a5ef892305b1a62b 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -183,7 +183,7 @@ bool Inst::liveness(InstNumberT InstNumber, LivenessBV &Live,
if (Live[VarNum]) {
if (!isDestNonKillable()) {
Live[VarNum] = false;
- if (LiveBegin) {
+ if (LiveBegin && Liveness->getRangeMask(Dest->getIndex())) {
LiveBegin->push_back(std::make_pair(VarNum, InstNumber));
}
}
@@ -223,7 +223,7 @@ bool Inst::liveness(InstNumberT InstNumber, LivenessBV &Live,
// when LiveEnd[VarNum]==0 (sentinel value). Note that it's
// OK to set LiveBegin multiple times because of the
// backwards traversal.
- if (LiveEnd) {
+ if (LiveEnd && Liveness->getRangeMask(Var->getIndex())) {
// Ideally, we would verify that VarNum wasn't already
// added in this block, but this can't be done very
// efficiently with LiveEnd as a vector. Instead,
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceLiveness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698