| 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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1249 | 1249 |
| 1250 GlobalContext *Context = Func->getContext(); | 1250 GlobalContext *Context = Func->getContext(); |
| 1251 | 1251 |
| 1252 bool BadIntrinsic = false; | 1252 bool BadIntrinsic = false; |
| 1253 const Intrinsics::FullIntrinsicInfo *Info = | 1253 const Intrinsics::FullIntrinsicInfo *Info = |
| 1254 Context->getIntrinsicsInfo().find(RMW_I64, BadIntrinsic); | 1254 Context->getIntrinsicsInfo().find(RMW_I64, BadIntrinsic); |
| 1255 assert(!BadIntrinsic); | 1255 assert(!BadIntrinsic); |
| 1256 assert(Info != nullptr); | 1256 assert(Info != nullptr); |
| 1257 | 1257 |
| 1258 Operand *RMWI64Name = Context->getConstantExternSym(RMW_I64); | 1258 Operand *RMWI64Name = Context->getConstantExternSym(RMW_I64); |
| 1259 Constant *Counter = Context->getConstantExternSym(Var->getName()); | 1259 constexpr RelocOffsetT Offset = 0; |
| 1260 constexpr bool SuppressMangling = true; |
| 1261 Constant *Counter = |
| 1262 Context->getConstantSym(Offset, Var->getName(), SuppressMangling); |
| 1260 Constant *AtomicRMWOp = Context->getConstantInt32(Intrinsics::AtomicAdd); | 1263 Constant *AtomicRMWOp = Context->getConstantInt32(Intrinsics::AtomicAdd); |
| 1261 Constant *One = Context->getConstantInt64(1); | 1264 Constant *One = Context->getConstantInt64(1); |
| 1262 Constant *OrderAcquireRelease = | 1265 Constant *OrderAcquireRelease = |
| 1263 Context->getConstantInt32(Intrinsics::MemoryOrderAcquireRelease); | 1266 Context->getConstantInt32(Intrinsics::MemoryOrderAcquireRelease); |
| 1264 | 1267 |
| 1265 InstIntrinsicCall *Inst = InstIntrinsicCall::create( | 1268 InstIntrinsicCall *Inst = InstIntrinsicCall::create( |
| 1266 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info); | 1269 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info); |
| 1267 Inst->addArg(AtomicRMWOp); | 1270 Inst->addArg(AtomicRMWOp); |
| 1268 Inst->addArg(Counter); | 1271 Inst->addArg(Counter); |
| 1269 Inst->addArg(One); | 1272 Inst->addArg(One); |
| 1270 Inst->addArg(OrderAcquireRelease); | 1273 Inst->addArg(OrderAcquireRelease); |
| 1271 Insts.push_front(Inst); | 1274 Insts.push_front(Inst); |
| 1272 } | 1275 } |
| 1273 | 1276 |
| 1274 } // end of namespace Ice | 1277 } // end of namespace Ice |
| OLD | NEW |