| 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 /// \file | 10 /// \file |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 addGlobalInitializer(Global, Exp->getOperand(0), true, | 780 addGlobalInitializer(Global, Exp->getOperand(0), true, |
| 781 getIntegerLiteralConstant(Exp->getOperand(1))); | 781 getIntegerLiteralConstant(Exp->getOperand(1))); |
| 782 return; | 782 return; |
| 783 case Instruction::PtrToInt: { | 783 case Instruction::PtrToInt: { |
| 784 assert(TypeConverter.convertToIceType(Exp->getType()) == | 784 assert(TypeConverter.convertToIceType(Exp->getType()) == |
| 785 Ice::getPointerType()); | 785 Ice::getPointerType()); |
| 786 const auto GV = dyn_cast<GlobalValue>(Exp->getOperand(0)); | 786 const auto GV = dyn_cast<GlobalValue>(Exp->getOperand(0)); |
| 787 assert(GV); | 787 assert(GV); |
| 788 const Ice::GlobalDeclaration *Addr = | 788 const Ice::GlobalDeclaration *Addr = |
| 789 getConverter().getGlobalDeclaration(GV); | 789 getConverter().getGlobalDeclaration(GV); |
| 790 Global.addInitializer( | 790 Global.addInitializer(Ice::VariableDeclaration::RelocInitializer::create( |
| 791 Ice::VariableDeclaration::RelocInitializer::create(Addr, Offset)); | 791 Addr, {Ice::RelocOffset::create(Ctx, Offset)})); |
| 792 return; | 792 return; |
| 793 } | 793 } |
| 794 default: | 794 default: |
| 795 break; | 795 break; |
| 796 } | 796 } |
| 797 } | 797 } |
| 798 | 798 |
| 799 std::string Buffer; | 799 std::string Buffer; |
| 800 raw_string_ostream StrBuf(Buffer); | 800 raw_string_ostream StrBuf(Buffer); |
| 801 StrBuf << "Unhandled global initializer: " << Initializer; | 801 StrBuf << "Unhandled global initializer: " << Initializer; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 Ctx->pushTimer(TimerID, StackID); | 924 Ctx->pushTimer(TimerID, StackID); |
| 925 } | 925 } |
| 926 LLVM2ICEFunctionConverter FunctionConverter(*this); | 926 LLVM2ICEFunctionConverter FunctionConverter(*this); |
| 927 FunctionConverter.convertFunction(&I); | 927 FunctionConverter.convertFunction(&I); |
| 928 if (TimeThisFunction) | 928 if (TimeThisFunction) |
| 929 Ctx->popTimer(TimerID, StackID); | 929 Ctx->popTimer(TimerID, StackID); |
| 930 } | 930 } |
| 931 } | 931 } |
| 932 | 932 |
| 933 } // end of namespace Ice | 933 } // end of namespace Ice |
| OLD | NEW |