| OLD | NEW |
| 1 //===- subzero/src/IceOperand.cpp - High-level operand implementation -----===// | 1 //===- subzero/src/IceOperand.cpp - High-level operand 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 Operand class and its target-independent | 10 // This file implements the Operand class and its target-independent |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 void Variable::setDefinition(Inst *Inst, const CfgNode *Node) { | 148 void Variable::setDefinition(Inst *Inst, const CfgNode *Node) { |
| 149 if (DefNode == NULL) | 149 if (DefNode == NULL) |
| 150 return; | 150 return; |
| 151 // Can first check preexisting DefInst if we care about multi-def vars. | 151 // Can first check preexisting DefInst if we care about multi-def vars. |
| 152 DefInst = Inst; | 152 DefInst = Inst; |
| 153 if (Node != DefNode) | 153 if (Node != DefNode) |
| 154 DefNode = NULL; | 154 DefNode = NULL; |
| 155 } | 155 } |
| 156 | 156 |
| 157 void Variable::resetDefinition() { |
| 158 DefNode = NULL; |
| 159 DefInst = NULL; |
| 160 } |
| 161 |
| 157 void Variable::replaceDefinition(Inst *Inst, const CfgNode *Node) { | 162 void Variable::replaceDefinition(Inst *Inst, const CfgNode *Node) { |
| 158 DefInst = NULL; | 163 DefInst = NULL; |
| 159 setDefinition(Inst, Node); | 164 setDefinition(Inst, Node); |
| 160 } | 165 } |
| 161 | 166 |
| 162 void Variable::setIsArg(Cfg *Func, bool IsArg) { | 167 void Variable::setIsArg(Cfg *Func, bool IsArg) { |
| 163 if (IsArg) { | 168 if (IsArg) { |
| 164 IsArgument = true; | 169 IsArgument = true; |
| 165 if (DefNode == NULL) | 170 if (DefNode == NULL) |
| 166 return; | 171 return; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 263 |
| 259 Ostream &operator<<(Ostream &Str, const RegWeight &W) { | 264 Ostream &operator<<(Ostream &Str, const RegWeight &W) { |
| 260 if (W.getWeight() == RegWeight::Inf) | 265 if (W.getWeight() == RegWeight::Inf) |
| 261 Str << "Inf"; | 266 Str << "Inf"; |
| 262 else | 267 else |
| 263 Str << W.getWeight(); | 268 Str << W.getWeight(); |
| 264 return Str; | 269 return Str; |
| 265 } | 270 } |
| 266 | 271 |
| 267 } // end of namespace Ice | 272 } // end of namespace Ice |
| OLD | NEW |