| 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 /// \file | 10 /// \file |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 { str } \ | 68 { str } \ |
| 69 , | 69 , |
| 70 ICEINSTICMP_TABLE | 70 ICEINSTICMP_TABLE |
| 71 #undef X | 71 #undef X |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // end of anonymous namespace | 74 } // end of anonymous namespace |
| 75 | 75 |
| 76 Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) | 76 Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) |
| 77 : Kind(Kind), Number(Func->newInstNumber()), Dest(Dest), MaxSrcs(MaxSrcs), | 77 : Kind(Kind), Number(Func->newInstNumber()), Dest(Dest), MaxSrcs(MaxSrcs), |
| 78 Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) {} | 78 Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) { |
| 79 if (Dest) |
| 80 Dest->setDefiningInst(this); |
| 81 } |
| 79 | 82 |
| 80 IceString Inst::getInstName() const { | 83 IceString Inst::getInstName() const { |
| 81 if (!BuildDefs::dump()) | 84 if (!BuildDefs::dump()) |
| 82 return "???"; | 85 return "???"; |
| 83 | 86 |
| 84 switch (Kind) { | 87 switch (Kind) { |
| 85 #define X(InstrKind, name) \ | 88 #define X(InstrKind, name) \ |
| 86 case InstrKind: \ | 89 case InstrKind: \ |
| 87 return name | 90 return name |
| 88 X(Unreachable, "unreachable"); | 91 X(Unreachable, "unreachable"); |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 // upper 32 bits of rax. We need to recognize and preserve these. | 1014 // upper 32 bits of rax. We need to recognize and preserve these. |
| 1012 return true; | 1015 return true; |
| 1013 } | 1016 } |
| 1014 if (!Dest->hasReg() && !SrcVar->hasReg() && | 1017 if (!Dest->hasReg() && !SrcVar->hasReg() && |
| 1015 Dest->getStackOffset() == SrcVar->getStackOffset()) | 1018 Dest->getStackOffset() == SrcVar->getStackOffset()) |
| 1016 return true; | 1019 return true; |
| 1017 return false; | 1020 return false; |
| 1018 } | 1021 } |
| 1019 | 1022 |
| 1020 } // end of namespace Ice | 1023 } // end of namespace Ice |
| OLD | NEW |