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

Side by Side Diff: src/IceCfg.cpp

Issue 1343843003: Refactor all instances of `typedef y x` to the C++11 `using x = y` syntax. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 | « src/IceCfg.h ('k') | src/IceConverter.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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 Target->regAlloc(RAK_Phi); 305 Target->regAlloc(RAK_Phi);
306 } 306 }
307 307
308 // Find a reasonable placement for nodes that have not yet been 308 // Find a reasonable placement for nodes that have not yet been
309 // placed, while maintaining the same relative ordering among already 309 // placed, while maintaining the same relative ordering among already
310 // placed nodes. 310 // placed nodes.
311 void Cfg::reorderNodes() { 311 void Cfg::reorderNodes() {
312 // TODO(ascull): it would be nice if the switch tests were always followed 312 // TODO(ascull): it would be nice if the switch tests were always followed
313 // by the default case to allow for fall through. 313 // by the default case to allow for fall through.
314 typedef std::list<CfgNode *> PlacedList; 314 using PlacedList = std::list<CfgNode *>;
315 PlacedList Placed; // Nodes with relative placement locked down 315 PlacedList Placed; // Nodes with relative placement locked down
316 PlacedList Unreachable; // Unreachable nodes 316 PlacedList Unreachable; // Unreachable nodes
317 PlacedList::iterator NoPlace = Placed.end(); 317 PlacedList::iterator NoPlace = Placed.end();
318 // Keep track of where each node has been tentatively placed so that 318 // Keep track of where each node has been tentatively placed so that
319 // we can manage insertions into the middle. 319 // we can manage insertions into the middle.
320 std::vector<PlacedList::iterator> PlaceIndex(Nodes.size(), NoPlace); 320 std::vector<PlacedList::iterator> PlaceIndex(Nodes.size(), NoPlace);
321 for (CfgNode *Node : Nodes) { 321 for (CfgNode *Node : Nodes) {
322 // The "do ... while(0);" construct is to factor out the 322 // The "do ... while(0);" construct is to factor out the
323 // --PlaceIndex and assert() statements before moving to the next 323 // --PlaceIndex and assert() statements before moving to the next
324 // node. 324 // node.
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 } 773 }
774 } 774 }
775 // Print each basic block 775 // Print each basic block
776 for (CfgNode *Node : Nodes) 776 for (CfgNode *Node : Nodes)
777 Node->dump(this); 777 Node->dump(this);
778 if (isVerbose(IceV_Instructions)) 778 if (isVerbose(IceV_Instructions))
779 Str << "}\n"; 779 Str << "}\n";
780 } 780 }
781 781
782 } // end of namespace Ice 782 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.h ('k') | src/IceConverter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698