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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 1206723003: Function Layout, Global Variable Layout and Pooled Constants Layout Reordering (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fixed some comments in patch set 1 Created 5 years, 6 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/IceTargetLowering.cpp - Basic lowering implementation --===// 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering 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 skeleton of the TargetLowering class, 10 // This file implements the skeleton of the TargetLowering class,
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 Str << "\t.p2align\t" << llvm::Log2_32(Align) << "\n"; 511 Str << "\t.p2align\t" << llvm::Log2_32(Align) << "\n";
512 } 512 }
513 513
514 Str << MangledName << ":\n"; 514 Str << MangledName << ":\n";
515 515
516 if (HasNonzeroInitializer) { 516 if (HasNonzeroInitializer) {
517 for (const std::unique_ptr<VariableDeclaration::Initializer> &Init : 517 for (const std::unique_ptr<VariableDeclaration::Initializer> &Init :
518 Var.getInitializers()) { 518 Var.getInitializers()) {
519 switch (Init->getKind()) { 519 switch (Init->getKind()) {
520 case VariableDeclaration::Initializer::DataInitializerKind: { 520 case VariableDeclaration::Initializer::DataInitializerKind: {
521 const auto &Data = llvm::cast<VariableDeclaration::DataInitializer>( 521 const auto &Data =
522 Init.get())->getContents(); 522 llvm::cast<VariableDeclaration::DataInitializer>(Init.get())
523 ->getContents();
523 for (SizeT i = 0; i < Init->getNumBytes(); ++i) { 524 for (SizeT i = 0; i < Init->getNumBytes(); ++i) {
524 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n"; 525 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n";
525 } 526 }
526 break; 527 break;
527 } 528 }
528 case VariableDeclaration::Initializer::ZeroInitializerKind: 529 case VariableDeclaration::Initializer::ZeroInitializerKind:
529 Str << "\t.zero\t" << Init->getNumBytes() << "\n"; 530 Str << "\t.zero\t" << Init->getNumBytes() << "\n";
530 break; 531 break;
531 case VariableDeclaration::Initializer::RelocInitializerKind: { 532 case VariableDeclaration::Initializer::RelocInitializerKind: {
532 const auto *Reloc = 533 const auto *Reloc =
(...skipping 29 matching lines...) Expand all
562 if (Target == Target_##X) \ 563 if (Target == Target_##X) \
563 return TargetHeader##X::create(Ctx); 564 return TargetHeader##X::create(Ctx);
564 #include "llvm/Config/SZTargets.def" 565 #include "llvm/Config/SZTargets.def"
565 566
566 llvm::report_fatal_error("Unsupported target header lowering"); 567 llvm::report_fatal_error("Unsupported target header lowering");
567 } 568 }
568 569
569 TargetHeaderLowering::~TargetHeaderLowering() = default; 570 TargetHeaderLowering::~TargetHeaderLowering() = default;
570 571
571 } // end of namespace Ice 572 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698