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

Unified Diff: src/IceTargetLowering.cpp

Issue 1323693002: Subzero: Provide a macro for iterating over instruction variables. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: "Addresses comments" 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/IceRegAlloc.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index 5ef6d098d62357f5a2db047dd9f09164a779e790..5268aa7f84f0419ffe53c4b8a6c13a70a4351623 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -25,6 +25,7 @@
#include "IceCfg.h" // setError()
#include "IceCfgNode.h"
#include "IceGlobalInits.h"
+#include "IceInstVarIter.h"
#include "IceOperand.h"
#include "IceRegAlloc.h"
#include "IceTargetLoweringARM32.h"
@@ -289,13 +290,8 @@ void TargetLowering::getVarStackSlotParams(
continue;
if (const Variable *Var = Inst.getDest())
IsVarReferenced[Var->getIndex()] = true;
- for (SizeT I = 0; I < Inst.getSrcSize(); ++I) {
- Operand *Src = Inst.getSrc(I);
- SizeT NumVars = Src->getNumVars();
- for (SizeT J = 0; J < NumVars; ++J) {
- const Variable *Var = Src->getVar(J);
- IsVarReferenced[Var->getIndex()] = true;
- }
+ FOREACH_VAR_IN_INST(Var, Inst) {
+ IsVarReferenced[Var->getIndex()] = true;
}
}
}
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698