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

Side by Side Diff: src/PNaClTranslator.cpp

Issue 1665423002: Subzero: Cleanup Inst==>Instr. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===// 1 //===- subzero/src/PNaClTranslator.cpp - ICE from bitcode -----------------===//
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 2725 matching lines...) Expand 10 before | Expand all | Expand 10 after
2736 Error(StrBuf.str()); 2736 Error(StrBuf.str());
2737 appendErrorInstruction(ReturnType); 2737 appendErrorInstruction(ReturnType);
2738 return; 2738 return;
2739 } 2739 }
2740 bool IsTailCall = static_cast<bool>(CCInfo & 1); 2740 bool IsTailCall = static_cast<bool>(CCInfo & 1);
2741 2741
2742 // Create the call instruction. 2742 // Create the call instruction.
2743 Ice::Variable *Dest = (ReturnType == Ice::IceType_void) 2743 Ice::Variable *Dest = (ReturnType == Ice::IceType_void)
2744 ? nullptr 2744 ? nullptr
2745 : getNextInstVar(ReturnType); 2745 : getNextInstVar(ReturnType);
2746 std::unique_ptr<Ice::InstCall> Inst; 2746 std::unique_ptr<Ice::InstCall> Instr;
2747 if (IntrinsicInfo) { 2747 if (IntrinsicInfo) {
2748 Inst.reset(Ice::InstIntrinsicCall::create(Func.get(), Params.size(), Dest, 2748 Instr.reset(Ice::InstIntrinsicCall::create(
2749 Callee, IntrinsicInfo->Info)); 2749 Func.get(), Params.size(), Dest, Callee, IntrinsicInfo->Info));
2750 } else { 2750 } else {
2751 Inst.reset(Ice::InstCall::create(Func.get(), Params.size(), Dest, Callee, 2751 Instr.reset(Ice::InstCall::create(Func.get(), Params.size(), Dest, Callee,
2752 IsTailCall)); 2752 IsTailCall));
2753 } 2753 }
2754 for (Ice::Operand *Param : Params) 2754 for (Ice::Operand *Param : Params)
2755 Inst->addArg(Param); 2755 Instr->addArg(Param);
2756 CurrentNode->appendInst(Inst.release()); 2756 CurrentNode->appendInst(Instr.release());
2757 return; 2757 return;
2758 } 2758 }
2759 case naclbitc::FUNC_CODE_INST_FORWARDTYPEREF: { 2759 case naclbitc::FUNC_CODE_INST_FORWARDTYPEREF: {
2760 // FORWARDTYPEREF: [opval, ty] 2760 // FORWARDTYPEREF: [opval, ty]
2761 if (!isValidRecordSize(2, "forward type ref")) 2761 if (!isValidRecordSize(2, "forward type ref"))
2762 return; 2762 return;
2763 Ice::Type OpType = Context->getSimpleTypeByID(Values[1]); 2763 Ice::Type OpType = Context->getSimpleTypeByID(Values[1]);
2764 setOperand(Values[0], createInstVar(OpType)); 2764 setOperand(Values[0], createInstVar(OpType));
2765 return; 2765 return;
2766 } 2766 }
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
3203 raw_string_ostream StrBuf(Buffer); 3203 raw_string_ostream StrBuf(Buffer);
3204 StrBuf << IRFilename << ": Does not contain a module!"; 3204 StrBuf << IRFilename << ": Does not contain a module!";
3205 llvm::report_fatal_error(StrBuf.str()); 3205 llvm::report_fatal_error(StrBuf.str());
3206 } 3206 }
3207 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) { 3207 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) {
3208 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes"); 3208 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes");
3209 } 3209 }
3210 } 3210 }
3211 3211
3212 } // end of namespace Ice 3212 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698