OLD | NEW |
1 //===- subzero/src/IceInst.cpp - High-level instruction implementation ----===// | 1 //===- subzero/src/IceInst.cpp - High-level instruction implementation ----===// |
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 Inst class, primarily the various | 10 // This file implements the Inst class, primarily the various |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 369 |
370 InstRet::InstRet(Cfg *Func, Operand *RetValue) | 370 InstRet::InstRet(Cfg *Func, Operand *RetValue) |
371 : Inst(Func, Ret, RetValue ? 1 : 0, NULL) { | 371 : Inst(Func, Ret, RetValue ? 1 : 0, NULL) { |
372 if (RetValue) | 372 if (RetValue) |
373 addSource(RetValue); | 373 addSource(RetValue); |
374 } | 374 } |
375 | 375 |
376 InstSelect::InstSelect(Cfg *Func, Variable *Dest, Operand *Condition, | 376 InstSelect::InstSelect(Cfg *Func, Variable *Dest, Operand *Condition, |
377 Operand *SourceTrue, Operand *SourceFalse) | 377 Operand *SourceTrue, Operand *SourceFalse) |
378 : Inst(Func, Inst::Select, 3, Dest) { | 378 : Inst(Func, Inst::Select, 3, Dest) { |
379 assert(Condition->getType() == IceType_i1); | 379 assert(typeElementType(Condition->getType()) == IceType_i1); |
380 addSource(Condition); | 380 addSource(Condition); |
381 addSource(SourceTrue); | 381 addSource(SourceTrue); |
382 addSource(SourceFalse); | 382 addSource(SourceFalse); |
383 } | 383 } |
384 | 384 |
385 InstStore::InstStore(Cfg *Func, Operand *Data, Operand *Addr) | 385 InstStore::InstStore(Cfg *Func, Operand *Data, Operand *Addr) |
386 : Inst(Func, Inst::Store, 2, NULL) { | 386 : Inst(Func, Inst::Store, 2, NULL) { |
387 addSource(Data); | 387 addSource(Data); |
388 addSource(Addr); | 388 addSource(Addr); |
389 } | 389 } |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 | 759 |
760 void InstTarget::dump(const Cfg *Func) const { | 760 void InstTarget::dump(const Cfg *Func) const { |
761 Ostream &Str = Func->getContext()->getStrDump(); | 761 Ostream &Str = Func->getContext()->getStrDump(); |
762 Str << "[TARGET] "; | 762 Str << "[TARGET] "; |
763 Inst::dump(Func); | 763 Inst::dump(Func); |
764 } | 764 } |
765 | 765 |
766 void InstTarget::dumpExtras(const Cfg *Func) const { Inst::dumpExtras(Func); } | 766 void InstTarget::dumpExtras(const Cfg *Func) const { Inst::dumpExtras(Func); } |
767 | 767 |
768 } // end of namespace Ice | 768 } // end of namespace Ice |
OLD | NEW |