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

Side by Side Diff: src/IceCfg.cpp

Issue 1368993004: Subzero: Improve usability of liveness-related tools. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/IceCfgNode.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/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 /// \file 10 /// \file
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 const bool IsDest = true; 610 const bool IsDest = true;
611 if (!Dest->getLiveRange().containsValue(InstNumber, IsDest)) 611 if (!Dest->getLiveRange().containsValue(InstNumber, IsDest))
612 Invalid = true; 612 Invalid = true;
613 // Check that this instruction actually *begins* Dest's live range, 613 // Check that this instruction actually *begins* Dest's live range,
614 // by checking that Dest is not live in the previous instruction. As 614 // by checking that Dest is not live in the previous instruction. As
615 // a special exception, we don't check this for the first instruction 615 // a special exception, we don't check this for the first instruction
616 // of the block, because a Phi temporary may be live at the end of 616 // of the block, because a Phi temporary may be live at the end of
617 // the previous block, and if it is also assigned in the first 617 // the previous block, and if it is also assigned in the first
618 // instruction of this block, the adjacent live ranges get merged. 618 // instruction of this block, the adjacent live ranges get merged.
619 if (static_cast<class Inst *>(&Inst) != FirstInst && 619 if (static_cast<class Inst *>(&Inst) != FirstInst &&
620 !Inst.isDestNonKillable() && 620 !Inst.isDestRedefined() &&
621 Dest->getLiveRange().containsValue(InstNumber - 1, IsDest)) 621 Dest->getLiveRange().containsValue(InstNumber - 1, IsDest))
622 Invalid = true; 622 Invalid = true;
623 if (Invalid) { 623 if (Invalid) {
624 Valid = false; 624 Valid = false;
625 Str << "Liveness error: inst " << Inst.getNumber() << " dest "; 625 Str << "Liveness error: inst " << Inst.getNumber() << " dest ";
626 Dest->dump(this); 626 Dest->dump(this);
627 Str << " live range " << Dest->getLiveRange() << "\n"; 627 Str << " live range " << Dest->getLiveRange() << "\n";
628 } 628 }
629 } 629 }
630 } 630 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 } 808 }
809 } 809 }
810 // Print each basic block 810 // Print each basic block
811 for (CfgNode *Node : Nodes) 811 for (CfgNode *Node : Nodes)
812 Node->dump(this); 812 Node->dump(this);
813 if (isVerbose(IceV_Instructions)) 813 if (isVerbose(IceV_Instructions))
814 Str << "}\n"; 814 Str << "}\n";
815 } 815 }
816 816
817 } // end of namespace Ice 817 } // end of namespace Ice
OLDNEW
« 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