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

Side by Side Diff: src/IceCfg.cpp

Issue 515993002: Align function starts to target-specific bundle alignment. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: uint8_t Created 6 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/IceDefs.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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 << "\n\n"; 307 << "\n\n";
308 } 308 }
309 Str << "\t.text\n"; 309 Str << "\t.text\n";
310 IceString MangledName = getContext()->mangleName(getFunctionName()); 310 IceString MangledName = getContext()->mangleName(getFunctionName());
311 if (Ctx->getFlags().FunctionSections) 311 if (Ctx->getFlags().FunctionSections)
312 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; 312 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n";
313 if (!getInternal()) { 313 if (!getInternal()) {
314 Str << "\t.globl\t" << MangledName << "\n"; 314 Str << "\t.globl\t" << MangledName << "\n";
315 Str << "\t.type\t" << MangledName << ",@function\n"; 315 Str << "\t.type\t" << MangledName << ",@function\n";
316 } 316 }
317 Str << "\t.p2align " << getTarget()->getBundleAlignLog2Bytes() << ",0x";
318 llvm::ArrayRef<uint8_t> Pad = getTarget()->getNonExecBundlePadding();
319 for (llvm::ArrayRef<uint8_t>::iterator I = Pad.begin(), E = Pad.end();
320 I != E; ++I) {
321 Str.write_hex(*I);
322 }
323 Str << "\n";
317 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; 324 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E;
318 ++I) { 325 ++I) {
319 (*I)->emit(this); 326 (*I)->emit(this);
320 } 327 }
321 Str << "\n"; 328 Str << "\n";
322 T_emit.printElapsedUs(Ctx, "emit()"); 329 T_emit.printElapsedUs(Ctx, "emit()");
323 } 330 }
324 331
325 // Dumps the IR with an optional introductory message. 332 // Dumps the IR with an optional introductory message.
326 void Cfg::dump(const IceString &Message) { 333 void Cfg::dump(const IceString &Message) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; 375 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E;
369 ++I) { 376 ++I) {
370 (*I)->dump(this); 377 (*I)->dump(this);
371 } 378 }
372 if (getContext()->isVerbose(IceV_Instructions)) { 379 if (getContext()->isVerbose(IceV_Instructions)) {
373 Str << "}\n"; 380 Str << "}\n";
374 } 381 }
375 } 382 }
376 383
377 } // end of namespace Ice 384 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698