| 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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 }; | 1177 }; |
| 1178 | 1178 |
| 1179 } // end of anonymous namespace | 1179 } // end of anonymous namespace |
| 1180 | 1180 |
| 1181 void CfgNode::emitIAS(Cfg *Func) const { | 1181 void CfgNode::emitIAS(Cfg *Func) const { |
| 1182 Func->setCurrentNode(this); | 1182 Func->setCurrentNode(this); |
| 1183 Assembler *Asm = Func->getAssembler<>(); | 1183 Assembler *Asm = Func->getAssembler<>(); |
| 1184 // TODO(stichnot): When sandboxing, defer binding the node label until just | 1184 // TODO(stichnot): When sandboxing, defer binding the node label until just |
| 1185 // before the first instruction is emitted, to reduce the chance that a | 1185 // before the first instruction is emitted, to reduce the chance that a |
| 1186 // padding nop is a branch target. | 1186 // padding nop is a branch target. |
| 1187 Asm->bindCfgNodeLabel(getIndex()); | 1187 Asm->bindCfgNodeLabel(this); |
| 1188 for (const Inst &I : Phis) { | 1188 for (const Inst &I : Phis) { |
| 1189 if (I.isDeleted()) | 1189 if (I.isDeleted()) |
| 1190 continue; | 1190 continue; |
| 1191 // Emitting a Phi instruction should cause an error. | 1191 // Emitting a Phi instruction should cause an error. |
| 1192 I.emitIAS(Func); | 1192 I.emitIAS(Func); |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 // Do the simple emission if not sandboxed. | 1195 // Do the simple emission if not sandboxed. |
| 1196 if (!Func->getContext()->getFlags().getUseSandboxing()) { | 1196 if (!Func->getContext()->getFlags().getUseSandboxing()) { |
| 1197 for (const Inst &I : Insts) { | 1197 for (const Inst &I : Insts) { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 InstIntrinsicCall *Inst = InstIntrinsicCall::create( | 1392 InstIntrinsicCall *Inst = InstIntrinsicCall::create( |
| 1393 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info); | 1393 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info); |
| 1394 Inst->addArg(AtomicRMWOp); | 1394 Inst->addArg(AtomicRMWOp); |
| 1395 Inst->addArg(Counter); | 1395 Inst->addArg(Counter); |
| 1396 Inst->addArg(One); | 1396 Inst->addArg(One); |
| 1397 Inst->addArg(OrderAcquireRelease); | 1397 Inst->addArg(OrderAcquireRelease); |
| 1398 Insts.push_front(Inst); | 1398 Insts.push_front(Inst); |
| 1399 } | 1399 } |
| 1400 | 1400 |
| 1401 } // end of namespace Ice | 1401 } // end of namespace Ice |
| OLD | NEW |