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

Unified Diff: src/IceLiveness.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/IceLiveness.h ('k') | src/IceRegAlloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceLiveness.cpp
diff --git a/src/IceLiveness.cpp b/src/IceLiveness.cpp
index da9b23d904eb1e5fde4039c8a2530a03a790778d..a1de893644c2814059079e3f856a04c6426b8389 100644
--- a/src/IceLiveness.cpp
+++ b/src/IceLiveness.cpp
@@ -100,6 +100,17 @@ void Liveness::initInternal(NodeList::const_iterator FirstNode,
// LiveBegin and LiveEnd are reinitialized before each pass over
// the block.
}
+
+ // Initialize the bitmask of which variables to track.
+ RangeMask.resize(NumVars);
+ RangeMask.set(0, NumVars);
+ if (!IsFullInit) {
+ // Reset initial variables that are not pre-colored or infinite-weight.
+ for (auto I = Func->getVariables().begin(); I != FirstVar; ++I) {
+ Variable *Var = *I;
+ RangeMask[Var->getIndex()] = (Var->hasReg() || Var->getWeight().isInf());
+ }
+ }
}
void Liveness::init() {
« no previous file with comments | « src/IceLiveness.h ('k') | src/IceRegAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698