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/IceOperand.cpp

Issue 652633002: Subzero: Improve performance of liveness analysis and live range construction. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix non-debug build Created 6 years, 2 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
Index: src/IceOperand.cpp
diff --git a/src/IceOperand.cpp b/src/IceOperand.cpp
index 9ecfd317d3872d5bf1d1223f5c35bdea535d9492..f75f1171da4408bc3a591f3bea2c971b83804fbc 100644
--- a/src/IceOperand.cpp
+++ b/src/IceOperand.cpp
@@ -184,6 +184,8 @@ Variable Variable::asType(Type Ty) {
void VariableTracking::markUse(const Inst *Instr, const CfgNode *Node,
bool IsFromDef, bool IsImplicit) {
+ if (MultiBlock == MBS_MultiBlock)
+ return;
// TODO(stichnot): If the use occurs as a source operand in the
// first instruction of the block, and its definition is in this
// block's only predecessor, we might consider not marking this as a
@@ -301,9 +303,7 @@ void VariablesMetadata::init() {
Metadata[Var->getIndex()].markUse(NoInst, EntryNode, IsFromDef, IsImplicit);
}
- SizeT NumNodes = Func->getNumNodes();
- for (SizeT N = 0; N < NumNodes; ++N) {
- CfgNode *Node = Func->getNodes()[N];
+ for (CfgNode *Node : Func->getNodes()) {
for (Inst *I : Node->getInsts()) {
if (I->isDeleted())
continue;

Powered by Google App Engine
This is Rietveld 408576698