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

Side by Side Diff: src/IceConverter.cpp

Issue 631383003: Subzero: Fix emission of global initializers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove the -disable-globals option Created 6 years, 2 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/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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 } 794 }
795 795
796 } // end of anonymous namespace 796 } // end of anonymous namespace
797 797
798 namespace Ice { 798 namespace Ice {
799 799
800 void Converter::convertToIce() { 800 void Converter::convertToIce() {
801 TimerMarker T(TimerStack::TT_convertToIce, Ctx); 801 TimerMarker T(TimerStack::TT_convertToIce, Ctx);
802 nameUnnamedGlobalAddresses(Mod); 802 nameUnnamedGlobalAddresses(Mod);
803 nameUnnamedFunctions(Mod); 803 nameUnnamedFunctions(Mod);
804 if (!Ctx->getFlags().DisableGlobals) 804 convertGlobals(Mod);
805 convertGlobals(Mod);
806 convertFunctions(); 805 convertFunctions();
807 } 806 }
808 807
809 void Converter::convertGlobals(Module *Mod) { 808 void Converter::convertGlobals(Module *Mod) {
810 LLVM2ICEGlobalsConverter GlobalsConverter(Ctx, Mod->getContext()); 809 LLVM2ICEGlobalsConverter GlobalsConverter(Ctx, Mod->getContext());
811 Translator::GlobalAddressList GlobalAddresses; 810 Translator::GlobalAddressList GlobalAddresses;
812 GlobalsConverter.convertGlobalsToIce(Mod, GlobalAddresses); 811 GlobalsConverter.convertGlobalsToIce(Mod, GlobalAddresses);
813 lowerGlobals(GlobalAddresses); 812 lowerGlobals(GlobalAddresses);
814 } 813 }
815 814
(...skipping 13 matching lines...) Expand all
829 Cfg *Fcn = FunctionConverter.convertFunction(&I); 828 Cfg *Fcn = FunctionConverter.convertFunction(&I);
830 translateFcn(Fcn); 829 translateFcn(Fcn);
831 if (Ctx->getFlags().TimeEachFunction) 830 if (Ctx->getFlags().TimeEachFunction)
832 Ctx->popTimer(TimerID, StackID); 831 Ctx->popTimer(TimerID, StackID);
833 } 832 }
834 833
835 emitConstants(); 834 emitConstants();
836 } 835 }
837 836
838 } // end of namespace Ice 837 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698