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; |