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

Side by Side Diff: src/IceCfg.cpp

Issue 1312433004: Weight variables by their number of uses for register allocation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Count uses in VMetadata Created 5 years, 3 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.cpp » ('j') | src/IceInst.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 /// \file 10 /// \file
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 758 }
759 resetCurrentNode(); 759 resetCurrentNode();
760 if (isVerbose(IceV_Liveness)) { 760 if (isVerbose(IceV_Liveness)) {
761 // Print summary info about variables 761 // Print summary info about variables
762 for (Variable *Var : Variables) { 762 for (Variable *Var : Variables) {
763 Str << "// multiblock="; 763 Str << "// multiblock=";
764 if (getVMetadata()->isTracked(Var)) 764 if (getVMetadata()->isTracked(Var))
765 Str << getVMetadata()->isMultiBlock(Var); 765 Str << getVMetadata()->isMultiBlock(Var);
766 else 766 else
767 Str << "?"; 767 Str << "?";
768 Str << " weight=" << Var->getWeight() << " "; 768 Str << " weight=" << Var->getWeight(this) << " ";
769 Var->dump(this); 769 Var->dump(this);
770 Str << " LIVE=" << Var->getLiveRange() << "\n"; 770 Str << " LIVE=" << Var->getLiveRange() << "\n";
771 } 771 }
772 } 772 }
773 // Print each basic block 773 // Print each basic block
774 for (CfgNode *Node : Nodes) 774 for (CfgNode *Node : Nodes)
775 Node->dump(this); 775 Node->dump(this);
776 if (isVerbose(IceV_Instructions)) 776 if (isVerbose(IceV_Instructions))
777 Str << "}\n"; 777 Str << "}\n";
778 } 778 }
779 779
780 } // end of namespace Ice 780 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceCfgNode.cpp » ('j') | src/IceInst.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698