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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |