Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/IceOperand.cpp

Issue 870653002: Subzero: Initial implementation of multithreaded translation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceInst.cpp ('k') | src/IceRegAlloc.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/IceInst.cpp ('k') | src/IceRegAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698