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

Unified Diff: src/IceCfg.cpp

Issue 709533002: Subzero: Implement InstList in terms of llvm::ilist<> . (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a comment explaining the ilist traits specialization Created 6 years, 1 month 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 | « no previous file | src/IceCfgNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 8e73499c46a8161c974510a1d621c382f8cef2ad..b461d682e090b8e79993b87a328eef93b51c0144 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -318,7 +318,8 @@ bool Cfg::validateLiveness() const {
Ostream &Str = Ctx->getStrDump();
for (CfgNode *Node : Nodes) {
Inst *FirstInst = NULL;
- for (Inst *Inst : Node->getInsts()) {
+ for (auto Inst = Node->getInsts().begin(), E = Node->getInsts().end();
+ Inst != E; ++Inst) {
if (Inst->isDeleted())
continue;
if (FirstInst == NULL)
@@ -337,7 +338,8 @@ bool Cfg::validateLiveness() const {
// temporary may be live at the end of the previous block,
// and if it is also assigned in the first instruction of
// this block, the adjacent live ranges get merged.
- if (Inst != FirstInst && !Inst->isDestNonKillable() &&
+ if (static_cast<class Inst *>(Inst) != FirstInst &&
+ !Inst->isDestNonKillable() &&
Dest->getLiveRange().containsValue(InstNumber - 1, IsDest))
Invalid = true;
if (Invalid) {
« no previous file with comments | « no previous file | src/IceCfgNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698