| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 Func->getTarget()->emitVariable(this); | 392 Func->getTarget()->emitVariable(this); |
| 393 } | 393 } |
| 394 | 394 |
| 395 void Variable::dump(const Cfg *Func, Ostream &Str) const { | 395 void Variable::dump(const Cfg *Func, Ostream &Str) const { |
| 396 if (!ALLOW_DUMP) | 396 if (!ALLOW_DUMP) |
| 397 return; | 397 return; |
| 398 if (Func == nullptr) { | 398 if (Func == nullptr) { |
| 399 Str << "%" << getName(Func); | 399 Str << "%" << getName(Func); |
| 400 return; | 400 return; |
| 401 } | 401 } |
| 402 if (Func->getContext()->isVerbose(IceV_RegOrigins) || | 402 if (Func->isVerbose(IceV_RegOrigins) || |
| 403 (!hasReg() && !Func->getTarget()->hasComputedFrame())) | 403 (!hasReg() && !Func->getTarget()->hasComputedFrame())) |
| 404 Str << "%" << getName(Func); | 404 Str << "%" << getName(Func); |
| 405 if (hasReg()) { | 405 if (hasReg()) { |
| 406 if (Func->getContext()->isVerbose(IceV_RegOrigins)) | 406 if (Func->isVerbose(IceV_RegOrigins)) |
| 407 Str << ":"; | 407 Str << ":"; |
| 408 Str << Func->getTarget()->getRegName(RegNum, getType()); | 408 Str << Func->getTarget()->getRegName(RegNum, getType()); |
| 409 } else if (Func->getTarget()->hasComputedFrame()) { | 409 } else if (Func->getTarget()->hasComputedFrame()) { |
| 410 if (Func->getContext()->isVerbose(IceV_RegOrigins)) | 410 if (Func->isVerbose(IceV_RegOrigins)) |
| 411 Str << ":"; | 411 Str << ":"; |
| 412 Str << "[" << Func->getTarget()->getRegName( | 412 Str << "[" << Func->getTarget()->getRegName( |
| 413 Func->getTarget()->getFrameOrStackReg(), IceType_i32); | 413 Func->getTarget()->getFrameOrStackReg(), IceType_i32); |
| 414 int32_t Offset = getStackOffset(); | 414 int32_t Offset = getStackOffset(); |
| 415 if (Offset) { | 415 if (Offset) { |
| 416 if (Offset > 0) | 416 if (Offset > 0) |
| 417 Str << "+"; | 417 Str << "+"; |
| 418 Str << Offset; | 418 Str << Offset; |
| 419 } | 419 } |
| 420 Str << "]"; | 420 Str << "]"; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 if (!ALLOW_DUMP) | 481 if (!ALLOW_DUMP) |
| 482 return Str; | 482 return Str; |
| 483 if (W.getWeight() == RegWeight::Inf) | 483 if (W.getWeight() == RegWeight::Inf) |
| 484 Str << "Inf"; | 484 Str << "Inf"; |
| 485 else | 485 else |
| 486 Str << W.getWeight(); | 486 Str << W.getWeight(); |
| 487 return Str; | 487 return Str; |
| 488 } | 488 } |
| 489 | 489 |
| 490 } // end of namespace Ice | 490 } // end of namespace Ice |
| OLD | NEW |