OLD | NEW |
1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) implementation -----===// | 1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) 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 CfgNode class, including the complexities | 10 // This file implements the CfgNode class, including the complexities |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 } | 488 } |
489 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E; | 489 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E; |
490 ++I) { | 490 ++I) { |
491 Inst *Inst = *I; | 491 Inst *Inst = *I; |
492 if (Inst->isDeleted()) | 492 if (Inst->isDeleted()) |
493 continue; | 493 continue; |
494 // Here we detect redundant assignments like "mov eax, eax" and | 494 // Here we detect redundant assignments like "mov eax, eax" and |
495 // suppress them. | 495 // suppress them. |
496 if (Inst->isRedundantAssign()) | 496 if (Inst->isRedundantAssign()) |
497 continue; | 497 continue; |
498 (*I)->emit(Func); | 498 if (Func->UseIntegratedAssembler()) { |
| 499 (*I)->emitIAS(Func); |
| 500 } else { |
| 501 (*I)->emit(Func); |
| 502 } |
499 // Update emitted instruction count, plus fill/spill count for | 503 // Update emitted instruction count, plus fill/spill count for |
500 // Variable operands without a physical register. | 504 // Variable operands without a physical register. |
501 if (uint32_t Count = (*I)->getEmitInstCount()) { | 505 if (uint32_t Count = (*I)->getEmitInstCount()) { |
502 Func->getContext()->statsUpdateEmitted(Count); | 506 Func->getContext()->statsUpdateEmitted(Count); |
503 if (Variable *Dest = (*I)->getDest()) { | 507 if (Variable *Dest = (*I)->getDest()) { |
504 if (!Dest->hasReg()) | 508 if (!Dest->hasReg()) |
505 Func->getContext()->statsUpdateFills(); | 509 Func->getContext()->statsUpdateFills(); |
506 } | 510 } |
507 for (SizeT S = 0; S < (*I)->getSrcSize(); ++S) { | 511 for (SizeT S = 0; S < (*I)->getSrcSize(); ++S) { |
508 if (Variable *Src = llvm::dyn_cast<Variable>((*I)->getSrc(S))) { | 512 if (Variable *Src = llvm::dyn_cast<Variable>((*I)->getSrc(S))) { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 I != E; ++I) { | 582 I != E; ++I) { |
579 if (I != OutEdges.begin()) | 583 if (I != OutEdges.begin()) |
580 Str << ", "; | 584 Str << ", "; |
581 Str << "%" << (*I)->getName(); | 585 Str << "%" << (*I)->getName(); |
582 } | 586 } |
583 Str << "\n"; | 587 Str << "\n"; |
584 } | 588 } |
585 } | 589 } |
586 | 590 |
587 } // end of namespace Ice | 591 } // end of namespace Ice |
OLD | NEW |