OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |