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

Side by Side Diff: src/IceCfg.cpp

Issue 691693003: Subzero: Improve the representation and handling of the FakeKill instruction. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Simplify special-casing of the FakeKills 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/IceCfgNode.cpp » ('j') | src/IceTargetLoweringX8632.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the Cfg class, including constant pool 10 // This file implements the Cfg class, including constant pool
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // appears within the Variable's computed live range. 309 // appears within the Variable's computed live range.
310 bool Cfg::validateLiveness() const { 310 bool Cfg::validateLiveness() const {
311 TimerMarker T(TimerStack::TT_validateLiveness, this); 311 TimerMarker T(TimerStack::TT_validateLiveness, this);
312 bool Valid = true; 312 bool Valid = true;
313 Ostream &Str = Ctx->getStrDump(); 313 Ostream &Str = Ctx->getStrDump();
314 for (CfgNode *Node : Nodes) { 314 for (CfgNode *Node : Nodes) {
315 Inst *FirstInst = NULL; 315 Inst *FirstInst = NULL;
316 for (Inst *Inst : Node->getInsts()) { 316 for (Inst *Inst : Node->getInsts()) {
317 if (Inst->isDeleted()) 317 if (Inst->isDeleted())
318 continue; 318 continue;
319 if (llvm::isa<InstFakeKill>(Inst))
320 continue;
321 if (FirstInst == NULL) 319 if (FirstInst == NULL)
322 FirstInst = Inst; 320 FirstInst = Inst;
323 InstNumberT InstNumber = Inst->getNumber(); 321 InstNumberT InstNumber = Inst->getNumber();
324 if (Variable *Dest = Inst->getDest()) { 322 if (Variable *Dest = Inst->getDest()) {
325 if (!Dest->getIgnoreLiveness()) { 323 if (!Dest->getIgnoreLiveness()) {
326 bool Invalid = false; 324 bool Invalid = false;
327 const bool IsDest = true; 325 const bool IsDest = true;
328 if (!Dest->getLiveRange().containsValue(InstNumber, IsDest)) 326 if (!Dest->getLiveRange().containsValue(InstNumber, IsDest))
329 Invalid = true; 327 Invalid = true;
330 // Check that this instruction actually *begins* Dest's live 328 // Check that this instruction actually *begins* Dest's live
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 461 }
464 } 462 }
465 // Print each basic block 463 // Print each basic block
466 for (CfgNode *Node : Nodes) 464 for (CfgNode *Node : Nodes)
467 Node->dump(this); 465 Node->dump(this);
468 if (getContext()->isVerbose(IceV_Instructions)) 466 if (getContext()->isVerbose(IceV_Instructions))
469 Str << "}\n"; 467 Str << "}\n";
470 } 468 }
471 469
472 } // end of namespace Ice 470 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceCfgNode.cpp » ('j') | src/IceTargetLoweringX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698