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

Side by Side Diff: src/IceConverter.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/IceCfg.cpp ('k') | src/IceInst.h » ('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/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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 } 579 }
580 return NewInst; 580 return NewInst;
581 } 581 }
582 582
583 Ice::Inst *convertAllocaInstruction(const AllocaInst *Inst) { 583 Ice::Inst *convertAllocaInstruction(const AllocaInst *Inst) {
584 // PNaCl bitcode only contains allocas of byte-granular objects. 584 // PNaCl bitcode only contains allocas of byte-granular objects.
585 Ice::Operand *ByteCount = convertValue(Inst->getArraySize()); 585 Ice::Operand *ByteCount = convertValue(Inst->getArraySize());
586 uint32_t Align = Inst->getAlignment(); 586 uint32_t Align = Inst->getAlignment();
587 Ice::Variable *Dest = mapValueToIceVar(Inst, Ice::getPointerType()); 587 Ice::Variable *Dest = mapValueToIceVar(Inst, Ice::getPointerType());
588 588
589 return Ice::InstAlloca::create(Func.get(), ByteCount, Align, Dest); 589 return Ice::InstAlloca::create(Func.get(), Dest, ByteCount, Align);
590 } 590 }
591 591
592 Ice::Inst *convertUnreachableInstruction(const UnreachableInst * /*Inst*/) { 592 Ice::Inst *convertUnreachableInstruction(const UnreachableInst * /*Inst*/) {
593 return Ice::InstUnreachable::create(Func.get()); 593 return Ice::InstUnreachable::create(Func.get());
594 } 594 }
595 595
596 Ice::CfgNode *convertBasicBlock(const BasicBlock *BB) { 596 Ice::CfgNode *convertBasicBlock(const BasicBlock *BB) {
597 Ice::CfgNode *Node = mapBasicBlockToNode(BB); 597 Ice::CfgNode *Node = mapBasicBlockToNode(BB);
598 for (const Instruction &II : *BB) { 598 for (const Instruction &II : *BB) {
599 Ice::Inst *Inst = convertInstruction(&II); 599 Ice::Inst *Inst = convertInstruction(&II);
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 Ctx->pushTimer(TimerID, StackID); 918 Ctx->pushTimer(TimerID, StackID);
919 } 919 }
920 LLVM2ICEFunctionConverter FunctionConverter(*this); 920 LLVM2ICEFunctionConverter FunctionConverter(*this);
921 FunctionConverter.convertFunction(&I); 921 FunctionConverter.convertFunction(&I);
922 if (TimeThisFunction) 922 if (TimeThisFunction)
923 Ctx->popTimer(TimerID, StackID); 923 Ctx->popTimer(TimerID, StackID);
924 } 924 }
925 } 925 }
926 926
927 } // end of namespace Ice 927 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceInst.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698