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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |