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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 bool Inst::liveness(InstNumberT InstNumber, LivenessBV &Live, | 164 bool Inst::liveness(InstNumberT InstNumber, LivenessBV &Live, |
165 Liveness *Liveness, LiveBeginEndMap *LiveBegin, | 165 Liveness *Liveness, LiveBeginEndMap *LiveBegin, |
166 LiveBeginEndMap *LiveEnd) { | 166 LiveBeginEndMap *LiveEnd) { |
167 assert(!isDeleted()); | 167 assert(!isDeleted()); |
168 | 168 |
169 Dead = false; | 169 Dead = false; |
170 if (Dest) { | 170 if (Dest) { |
171 SizeT VarNum = Liveness->getLiveIndex(Dest->getIndex()); | 171 SizeT VarNum = Liveness->getLiveIndex(Dest->getIndex()); |
172 if (Live[VarNum]) { | 172 if (Live[VarNum]) { |
173 if (!isDestNonKillable()) { | 173 if (!isDestRedefined()) { |
174 Live[VarNum] = false; | 174 Live[VarNum] = false; |
175 if (LiveBegin && Liveness->getRangeMask(Dest->getIndex())) { | 175 if (LiveBegin && Liveness->getRangeMask(Dest->getIndex())) { |
176 LiveBegin->push_back(std::make_pair(VarNum, InstNumber)); | 176 LiveBegin->push_back(std::make_pair(VarNum, InstNumber)); |
177 } | 177 } |
178 } | 178 } |
179 } else { | 179 } else { |
180 if (!hasSideEffects()) | 180 if (!hasSideEffects()) |
181 Dead = true; | 181 Dead = true; |
182 } | 182 } |
183 } | 183 } |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 // upper 32 bits of rax. We need to recognize and preserve these. | 953 // upper 32 bits of rax. We need to recognize and preserve these. |
954 return true; | 954 return true; |
955 } | 955 } |
956 if (!Dest->hasReg() && !SrcVar->hasReg() && | 956 if (!Dest->hasReg() && !SrcVar->hasReg() && |
957 Dest->getStackOffset() == SrcVar->getStackOffset()) | 957 Dest->getStackOffset() == SrcVar->getStackOffset()) |
958 return true; | 958 return true; |
959 return false; | 959 return false; |
960 } | 960 } |
961 | 961 |
962 } // end of namespace Ice | 962 } // end of namespace Ice |
OLD | NEW |