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

Side by Side Diff: src/IceConverter.cpp

Issue 567703003: Allow ability to name unnamed global addresses in Subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits in patch set 4. 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 | « src/IceClFlags.h ('k') | src/IceTranslator.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/IceConverter.cpp - Converts LLVM to Ice ---------------===// 1 //===- subzero/src/IceConverter.cpp - Converts LLVM to Ice ---------------===//
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 LLVM to ICE converter. 10 // This file implements the LLVM to ICE converter.
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 std::map<const Value *, Ice::Variable *> VarMap; 601 std::map<const Value *, Ice::Variable *> VarMap;
602 std::map<const BasicBlock *, Ice::CfgNode *> NodeMap; 602 std::map<const BasicBlock *, Ice::CfgNode *> NodeMap;
603 Ice::TypeConverter TypeConverter; 603 Ice::TypeConverter TypeConverter;
604 }; 604 };
605 605
606 } // end of anonymous namespace 606 } // end of anonymous namespace
607 607
608 namespace Ice { 608 namespace Ice {
609 609
610 void Converter::convertToIce() { 610 void Converter::convertToIce() {
611 nameUnnamedGlobalAddresses(Mod);
611 if (!Ctx->getFlags().DisableGlobals) 612 if (!Ctx->getFlags().DisableGlobals)
612 convertGlobals(); 613 convertGlobals();
613 convertFunctions(); 614 convertFunctions();
614 } 615 }
615 616
616 void Converter::convertGlobals() { 617 void Converter::convertGlobals() {
617 OwningPtr<TargetGlobalInitLowering> GlobalLowering( 618 OwningPtr<TargetGlobalInitLowering> GlobalLowering(
618 TargetGlobalInitLowering::createLowering(Ctx->getTargetArch(), Ctx)); 619 TargetGlobalInitLowering::createLowering(Ctx->getTargetArch(), Ctx));
619 for (Module::const_global_iterator I = Mod->global_begin(), 620 for (Module::const_global_iterator I = Mod->global_begin(),
620 E = Mod->global_end(); 621 E = Mod->global_end();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 << Fcn->getFunctionName() << ": " << TConvert.getElapsedSec() 670 << Fcn->getFunctionName() << ": " << TConvert.getElapsedSec()
670 << " sec\n"; 671 << " sec\n";
671 } 672 }
672 translateFcn(Fcn); 673 translateFcn(Fcn);
673 } 674 }
674 675
675 emitConstants(); 676 emitConstants();
676 } 677 }
677 678
678 } // end of namespace Ice 679 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceClFlags.h ('k') | src/IceTranslator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698