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

Side by Side Diff: src/IceCfg.cpp

Issue 2172313002: Subzero : Live Range Splitting after initial Register Allocation (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 4 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 unified diff | Download patch
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 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 } 1699 }
1700 1700
1701 size_t Cfg::getLivenessMemoryMB() const { 1701 size_t Cfg::getLivenessMemoryMB() const {
1702 constexpr size_t _1MB = 1024 * 1024; 1702 constexpr size_t _1MB = 1024 * 1024;
1703 if (Live == nullptr) { 1703 if (Live == nullptr) {
1704 return 0; 1704 return 0;
1705 } 1705 }
1706 return Live->getAllocator()->getTotalMemory() / _1MB; 1706 return Live->getAllocator()->getTotalMemory() / _1MB;
1707 } 1707 }
1708 1708
1709 void Cfg::addVariable(Variable *Var) {
1710 assert(Var);
1711 Var->setIndex(getVariables().size());
1712 Variables.push_back(Var);
1713 }
1714
1709 // Dumps the IR with an optional introductory message. 1715 // Dumps the IR with an optional introductory message.
1710 void Cfg::dump(const char *Message) { 1716 void Cfg::dump(const char *Message) {
1711 if (!BuildDefs::dump()) 1717 if (!BuildDefs::dump())
1712 return; 1718 return;
1713 if (!isVerbose()) 1719 if (!isVerbose())
1714 return; 1720 return;
1715 OstreamLocker L(Ctx); 1721 OstreamLocker L(Ctx);
1716 Ostream &Str = Ctx->getStrDump(); 1722 Ostream &Str = Ctx->getStrDump();
1717 if (Message[0]) 1723 if (Message[0])
1718 Str << "================ " << Message << " ================\n"; 1724 Str << "================ " << Message << " ================\n";
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 } 1773 }
1768 } 1774 }
1769 // Print each basic block 1775 // Print each basic block
1770 for (CfgNode *Node : Nodes) 1776 for (CfgNode *Node : Nodes)
1771 Node->dump(this); 1777 Node->dump(this);
1772 if (isVerbose(IceV_Instructions)) 1778 if (isVerbose(IceV_Instructions))
1773 Str << "}\n"; 1779 Str << "}\n";
1774 } 1780 }
1775 1781
1776 } // end of namespace Ice 1782 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.h ('k') | src/IceCfgNode.cpp » ('j') | src/IceCfgNode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698