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

Unified Diff: src/IceLiveness.cpp

Issue 589003002: Subzero: Refactor tracking of Defs and block-local Variables. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: "Mark args as being used in the entry node" was unnecessary. Created 6 years, 3 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/IceInstX8632.cpp ('k') | src/IceOperand.h » ('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 47ef358f585d8db3204dfe3c98775ae4571afe12..e2703c26446f0b3b89e65bc1086511389927d8a5 100644
--- a/src/IceLiveness.cpp
+++ b/src/IceLiveness.cpp
@@ -41,10 +41,10 @@ void Liveness::init() {
// block.
for (SizeT i = 0; i < NumVars; ++i) {
Variable *Var = Func->getVariables()[i];
- if (Var->isMultiblockLife()) {
+ if (Func->getVMetadata()->isMultiBlock(Var)) {
++NumGlobals;
} else {
- SizeT Index = Var->getLocalUseNode()->getIndex();
+ SizeT Index = Func->getVMetadata()->getLocalUseNode(Var)->getIndex();
++Nodes[Index].NumLocals;
}
}
@@ -64,11 +64,11 @@ void Liveness::init() {
Variable *Var = Func->getVariables()[i];
SizeT VarIndex = Var->getIndex();
SizeT LiveIndex;
- if (Var->isMultiblockLife()) {
+ if (Func->getVMetadata()->isMultiBlock(Var)) {
LiveIndex = TmpNumGlobals++;
LiveToVarMap[LiveIndex] = Var;
} else {
- SizeT NodeIndex = Var->getLocalUseNode()->getIndex();
+ SizeT NodeIndex = Func->getVMetadata()->getLocalUseNode(Var)->getIndex();
LiveIndex = Nodes[NodeIndex].NumLocals++;
Nodes[NodeIndex].LiveToVarMap[LiveIndex] = Var;
LiveIndex += NumGlobals;
« no previous file with comments | « src/IceInstX8632.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698