| 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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 Ice::Inst *Inst = convertInstruction(&II); | 582 Ice::Inst *Inst = convertInstruction(&II); |
| 583 Node->appendInst(Inst); | 583 Node->appendInst(Inst); |
| 584 } | 584 } |
| 585 return Node; | 585 return Node; |
| 586 } | 586 } |
| 587 | 587 |
| 588 void validateIntrinsicCall(const Ice::InstCall *Call, | 588 void validateIntrinsicCall(const Ice::InstCall *Call, |
| 589 const Ice::Intrinsics::FullIntrinsicInfo *I) { | 589 const Ice::Intrinsics::FullIntrinsicInfo *I) { |
| 590 Ice::SizeT ArgIndex = 0; | 590 Ice::SizeT ArgIndex = 0; |
| 591 switch (I->validateCall(Call, ArgIndex)) { | 591 switch (I->validateCall(Call, ArgIndex)) { |
| 592 default: | |
| 593 report_fatal_error("Unknown validation error for intrinsic call"); | |
| 594 break; | |
| 595 case Ice::Intrinsics::IsValidCall: | 592 case Ice::Intrinsics::IsValidCall: |
| 596 break; | 593 break; |
| 597 case Ice::Intrinsics::BadReturnType: { | 594 case Ice::Intrinsics::BadReturnType: { |
| 598 std::string Buffer; | 595 std::string Buffer; |
| 599 raw_string_ostream StrBuf(Buffer); | 596 raw_string_ostream StrBuf(Buffer); |
| 600 StrBuf << "Intrinsic call expects return type " << I->getReturnType() | 597 StrBuf << "Intrinsic call expects return type " << I->getReturnType() |
| 601 << ". Found: " << Call->getReturnType(); | 598 << ". Found: " << Call->getReturnType(); |
| 602 report_fatal_error(StrBuf.str()); | 599 report_fatal_error(StrBuf.str()); |
| 603 break; | 600 break; |
| 604 } | 601 } |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 Cfg *Fcn = FunctionConverter.convertFunction(&I); | 889 Cfg *Fcn = FunctionConverter.convertFunction(&I); |
| 893 translateFcn(Fcn); | 890 translateFcn(Fcn); |
| 894 if (ALLOW_DUMP && Ctx->getFlags().TimeEachFunction) | 891 if (ALLOW_DUMP && Ctx->getFlags().TimeEachFunction) |
| 895 Ctx->popTimer(TimerID, StackID); | 892 Ctx->popTimer(TimerID, StackID); |
| 896 } | 893 } |
| 897 | 894 |
| 898 emitConstants(); | 895 emitConstants(); |
| 899 } | 896 } |
| 900 | 897 |
| 901 } // end of namespace Ice | 898 } // end of namespace Ice |
| OLD | NEW |