================
@@ -3173,19 +3173,14 @@ convertOmpThreadprivate(Operation &opInst,
llvm::IRBuilderBase &builder,
LLVM::GlobalOp global =
addressOfOp.getGlobal(moduleTranslation.symbolTable());
llvm::GlobalValue *globalValue = moduleTranslation.lookupGlobal(global);
-
- if (!ompBuilder->Config.isTargetDevice()) {
- llvm::Type *type = globalValue->getValueType();
- llvm::TypeSize typeSize =
-
builder.GetInsertBlock()->getModule()->getDataLayout().getTypeStoreSize(
- type);
- llvm::ConstantInt *size = builder.getInt64(typeSize.getFixedValue());
- llvm::Value *callInst = ompBuilder->createCachedThreadPrivate(
- ompLoc, globalValue, size, global.getSymName() + ".cache");
- moduleTranslation.mapValue(opInst.getResult(0), callInst);
- } else {
- moduleTranslation.mapValue(opInst.getResult(0), globalValue);
----------------
ergawy wrote:
Just to verify my understanding, we do not need the `else` here since for
`target` regions, we pass `threadprivate` values as kernel arguments, right?
https://github.com/llvm/llvm-project/pull/137201
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits