[Mlir-commits] [mlir] 1fb3fe0 - [mlir] Avoid Type::getPointerTo() (NFC)
Youngsuk Kim
llvmlistbot at llvm.org
Fri Sep 27 13:25:46 PDT 2024
Author: Youngsuk Kim
Date: 2024-09-27T15:25:20-05:00
New Revision: 1fb3fe04cf7ce58da377a54fc435d9d8361075e3
URL: https://github.com/llvm/llvm-project/commit/1fb3fe04cf7ce58da377a54fc435d9d8361075e3
DIFF: https://github.com/llvm/llvm-project/commit/1fb3fe04cf7ce58da377a54fc435d9d8361075e3.diff
LOG: [mlir] Avoid Type::getPointerTo() (NFC)
Avoid `Type::getPointerTo()` which is to be removed soon.
Also use CreateAddrSpaceCast for more clarity.
Added:
Modified:
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 0cba8d80681f13..d788fe1f6165e6 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -3359,8 +3359,7 @@ createDeviceArgumentAccessor(MapInfoData &mapData, llvm::Argument &arg,
llvm::Value *v = builder.CreateAlloca(arg.getType(), allocaAS);
if (allocaAS != defaultAS && arg.getType()->isPointerTy())
- v = builder.CreatePointerBitCastOrAddrSpaceCast(
- v, arg.getType()->getPointerTo(defaultAS));
+ v = builder.CreateAddrSpaceCast(v, builder.getPtrTy(defaultAS));
builder.CreateStore(&arg, v);
More information about the Mlir-commits
mailing list