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

Side by Side Diff: src/PNaClTranslator.cpp

Issue 1435363002: Merge fixed alloca stack adjustments into the prolog (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Final code review comments Created 5 years, 1 month 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/IceTargetLoweringX86Base.h ('k') | tests_lit/llvm2ice_tests/alloc.ll » ('j') | 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 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 Ice::Type PtrTy = Ice::getPointerType(); 2619 Ice::Type PtrTy = Ice::getPointerType();
2620 if (ByteCount->getType() != Ice::IceType_i32) { 2620 if (ByteCount->getType() != Ice::IceType_i32) {
2621 std::string Buffer; 2621 std::string Buffer;
2622 raw_string_ostream StrBuf(Buffer); 2622 raw_string_ostream StrBuf(Buffer);
2623 StrBuf << "Alloca on non-i32 value. Found: " << *ByteCount; 2623 StrBuf << "Alloca on non-i32 value. Found: " << *ByteCount;
2624 Error(StrBuf.str()); 2624 Error(StrBuf.str());
2625 appendErrorInstruction(PtrTy); 2625 appendErrorInstruction(PtrTy);
2626 return; 2626 return;
2627 } 2627 }
2628 CurrentNode->appendInst(Ice::InstAlloca::create( 2628 CurrentNode->appendInst(Ice::InstAlloca::create(
2629 Func.get(), ByteCount, Alignment, getNextInstVar(PtrTy))); 2629 Func.get(), getNextInstVar(PtrTy), ByteCount, Alignment));
2630 return; 2630 return;
2631 } 2631 }
2632 case naclbitc::FUNC_CODE_INST_LOAD: { 2632 case naclbitc::FUNC_CODE_INST_LOAD: {
2633 // LOAD: [address, align, ty] 2633 // LOAD: [address, align, ty]
2634 if (!isValidRecordSize(3, "load")) 2634 if (!isValidRecordSize(3, "load"))
2635 return; 2635 return;
2636 Ice::Operand *Address = getRelativeOperand(Values[0], BaseIndex); 2636 Ice::Operand *Address = getRelativeOperand(Values[0], BaseIndex);
2637 Ice::Type Ty = Context->getSimpleTypeByID(Values[2]); 2637 Ice::Type Ty = Context->getSimpleTypeByID(Values[2]);
2638 uint32_t Alignment = Context->extractAlignment(this, "Load", Values[1]); 2638 uint32_t Alignment = Context->extractAlignment(this, "Load", Values[1]);
2639 if (isIRGenerationDisabled()) { 2639 if (isIRGenerationDisabled()) {
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
3297 raw_string_ostream StrBuf(Buffer); 3297 raw_string_ostream StrBuf(Buffer);
3298 StrBuf << IRFilename << ": Does not contain a module!"; 3298 StrBuf << IRFilename << ": Does not contain a module!";
3299 llvm::report_fatal_error(StrBuf.str()); 3299 llvm::report_fatal_error(StrBuf.str());
3300 } 3300 }
3301 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) { 3301 if (InputStreamFile.getBitcodeBytes().getExtent() % 4 != 0) {
3302 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes"); 3302 llvm::report_fatal_error("Bitcode stream should be a multiple of 4 bytes");
3303 } 3303 }
3304 } 3304 }
3305 3305
3306 } // end of namespace Ice 3306 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX86Base.h ('k') | tests_lit/llvm2ice_tests/alloc.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698