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

Side by Side Diff: src/IceCfg.cpp

Issue 463563006: Subzero: Randomly insert nops. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Fix insertion strategy Created 6 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
« no previous file with comments | « src/IceCfg.h ('k') | 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 // This file implements the Cfg class, including constant pool 10 // This file implements the Cfg class, including constant pool
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void Cfg::doArgLowering() { 114 void Cfg::doArgLowering() {
115 getTarget()->lowerArguments(); 115 getTarget()->lowerArguments();
116 } 116 }
117 117
118 void Cfg::doAddressOpt() { 118 void Cfg::doAddressOpt() {
119 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) { 119 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) {
120 (*I)->doAddressOpt(); 120 (*I)->doAddressOpt();
121 } 121 }
122 } 122 }
123 123
124 void Cfg::doNopInsertion() {
125 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) {
126 (*I)->doNopInsertion();
127 }
128 }
129
124 void Cfg::genCode() { 130 void Cfg::genCode() {
125 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) { 131 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) {
126 (*I)->genCode(); 132 (*I)->genCode();
127 } 133 }
128 } 134 }
129 135
130 // Compute the stack frame layout. 136 // Compute the stack frame layout.
131 void Cfg::genFrame() { 137 void Cfg::genFrame() {
132 getTarget()->addProlog(Entry); 138 getTarget()->addProlog(Entry);
133 // TODO: Consider folding epilog generation into the final 139 // TODO: Consider folding epilog generation into the final
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; 368 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E;
363 ++I) { 369 ++I) {
364 (*I)->dump(this); 370 (*I)->dump(this);
365 } 371 }
366 if (getContext()->isVerbose(IceV_Instructions)) { 372 if (getContext()->isVerbose(IceV_Instructions)) {
367 Str << "}\n"; 373 Str << "}\n";
368 } 374 }
369 } 375 }
370 376
371 } // end of namespace Ice 377 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.h ('k') | src/IceCfgNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698