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

Side by Side Diff: src/IceCfgNode.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: Add an assert 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 | « src/IceCfg.cpp ('k') | src/IceInst.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) implementation -----===// 1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) 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 CfgNode class, including the complexities 10 // This file implements the CfgNode class, including the complexities
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 continue; 660 continue;
661 if (FirstInstNum == Inst::NumberSentinel) 661 if (FirstInstNum == Inst::NumberSentinel)
662 FirstInstNum = I->getNumber(); 662 FirstInstNum = I->getNumber();
663 assert(I->getNumber() > LastInstNum); 663 assert(I->getNumber() > LastInstNum);
664 LastInstNum = I->getNumber(); 664 LastInstNum = I->getNumber();
665 // Create fake live ranges for a Kill instruction, but only if the 665 // Create fake live ranges for a Kill instruction, but only if the
666 // linked instruction is still alive. 666 // linked instruction is still alive.
667 if (Mode == Liveness_Intervals) { 667 if (Mode == Liveness_Intervals) {
668 if (InstFakeKill *Kill = llvm::dyn_cast<InstFakeKill>(I)) { 668 if (InstFakeKill *Kill = llvm::dyn_cast<InstFakeKill>(I)) {
669 if (!Kill->getLinked()->isDeleted()) { 669 if (!Kill->getLinked()->isDeleted()) {
670 SizeT NumSrcs = I->getSrcSize(); 670 for (Variable *Var : Kill->getKilledRegs()) {
671 for (SizeT Src = 0; Src < NumSrcs; ++Src) {
672 Variable *Var = llvm::cast<Variable>(I->getSrc(Src));
673 InstNumberT InstNumber = I->getNumber(); 671 InstNumberT InstNumber = I->getNumber();
674 Var->addLiveRange(InstNumber, InstNumber, 1); 672 Var->addLiveRange(InstNumber, InstNumber, 1);
675 } 673 }
676 } 674 }
677 } 675 }
678 } 676 }
679 } 677 }
680 if (Mode != Liveness_Intervals) 678 if (Mode != Liveness_Intervals)
681 return; 679 return;
682 TimerMarker T1(TimerStack::TT_liveRangeCtor, Func); 680 TimerMarker T1(TimerStack::TT_liveRangeCtor, Func);
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 if (!First) 992 if (!First)
995 Str << ", "; 993 Str << ", ";
996 First = false; 994 First = false;
997 Str << "%" << I->getName(); 995 Str << "%" << I->getName();
998 } 996 }
999 Str << "\n"; 997 Str << "\n";
1000 } 998 }
1001 } 999 }
1002 1000
1003 } // end of namespace Ice 1001 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceInst.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698