| 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 /// \file | 10 /// \file |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 } | 607 } |
| 608 | 608 |
| 609 // When using the sparse representation, after traversing the | 609 // When using the sparse representation, after traversing the |
| 610 // instructions in the block, the Live bitvector should only contain | 610 // instructions in the block, the Live bitvector should only contain |
| 611 // set bits for global variables upon block entry. We validate this | 611 // set bits for global variables upon block entry. We validate this |
| 612 // by shrinking the Live vector and then testing it against the | 612 // by shrinking the Live vector and then testing it against the |
| 613 // pre-shrunk version. (The shrinking is required, but the | 613 // pre-shrunk version. (The shrinking is required, but the |
| 614 // validation is not.) | 614 // validation is not.) |
| 615 LivenessBV LiveOrig = Live; | 615 LivenessBV LiveOrig = Live; |
| 616 Live.resize(Liveness->getNumGlobalVars()); | 616 Live.resize(Liveness->getNumGlobalVars()); |
| 617 // Non-global arguments in the entry node are allowed to be live on | 617 if (Live != LiveOrig) { |
| 618 // entry. | |
| 619 bool IsEntry = (Func->getEntryNode() == this); | |
| 620 if (!(IsEntry || Live == LiveOrig)) { | |
| 621 if (BuildDefs::dump()) { | 618 if (BuildDefs::dump()) { |
| 622 // This is a fatal liveness consistency error. Print some | 619 // This is a fatal liveness consistency error. Print some |
| 623 // diagnostics and abort. | 620 // diagnostics and abort. |
| 624 Ostream &Str = Func->getContext()->getStrDump(); | 621 Ostream &Str = Func->getContext()->getStrDump(); |
| 625 Func->resetCurrentNode(); | 622 Func->resetCurrentNode(); |
| 626 Str << "LiveOrig-Live ="; | 623 Str << "LiveOrig-Live ="; |
| 627 for (SizeT i = Live.size(); i < LiveOrig.size(); ++i) { | 624 for (SizeT i = Live.size(); i < LiveOrig.size(); ++i) { |
| 628 if (LiveOrig.test(i)) { | 625 if (LiveOrig.test(i)) { |
| 629 Str << " "; | 626 Str << " "; |
| 630 Liveness->getVariable(i, this)->dump(Func); | 627 Liveness->getVariable(i, this)->dump(Func); |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 InstIntrinsicCall *Inst = InstIntrinsicCall::create( | 1277 InstIntrinsicCall *Inst = InstIntrinsicCall::create( |
| 1281 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info); | 1278 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info); |
| 1282 Inst->addArg(AtomicRMWOp); | 1279 Inst->addArg(AtomicRMWOp); |
| 1283 Inst->addArg(Counter); | 1280 Inst->addArg(Counter); |
| 1284 Inst->addArg(One); | 1281 Inst->addArg(One); |
| 1285 Inst->addArg(OrderAcquireRelease); | 1282 Inst->addArg(OrderAcquireRelease); |
| 1286 Insts.push_front(Inst); | 1283 Insts.push_front(Inst); |
| 1287 } | 1284 } |
| 1288 | 1285 |
| 1289 } // end of namespace Ice | 1286 } // end of namespace Ice |
| OLD | NEW |