diff options
author | Fabian Mora <6982088+fabianmcg@users.noreply.github.com> | 2025-09-14 17:08:06 +0000 |
---|---|---|
committer | Fabian Mora <6982088+fabianmcg@users.noreply.github.com> | 2025-09-14 17:08:06 +0000 |
commit | c25dd35390c59203d8f1755d6b1e7c4c12b3c8b5 (patch) | |
tree | 4b2bbfaf0a8d4e5f20faa9f08f2e0559f3128a87 | |
parent | 5ea857101e564d493dc11c516a98c3152a6ec204 (diff) |
use translate instead of convertupstream/users/fabianmcg/ptr-diffop
-rw-r--r-- | mlir/lib/Target/LLVMIR/Dialect/Ptr/PtrToLLVMIRTranslation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mlir/lib/Target/LLVMIR/Dialect/Ptr/PtrToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/Ptr/PtrToLLVMIRTranslation.cpp index 3ff558ba91bb..8d6fffcca45f 100644 --- a/mlir/lib/Target/LLVMIR/Dialect/Ptr/PtrToLLVMIRTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/Dialect/Ptr/PtrToLLVMIRTranslation.cpp @@ -351,21 +351,21 @@ translateConstantOp(ConstantOp constantOp, llvm::IRBuilderBase &builder, return success(); } -/// Convert ptr.ptr_diff operation +/// Translate ptr.ptr_diff operation operation to LLVM IR. static LogicalResult -convertPtrDiffOp(PtrDiffOp ptrDiffOp, llvm::IRBuilderBase &builder, - LLVM::ModuleTranslation &moduleTranslation) { +translatePtrDiffOp(PtrDiffOp ptrDiffOp, llvm::IRBuilderBase &builder, + LLVM::ModuleTranslation &moduleTranslation) { llvm::Value *lhs = moduleTranslation.lookupValue(ptrDiffOp.getLhs()); llvm::Value *rhs = moduleTranslation.lookupValue(ptrDiffOp.getRhs()); if (!lhs || !rhs) return ptrDiffOp.emitError("Failed to lookup operands"); - // Convert result type to LLVM type + // Translate result type to LLVM type llvm::Type *resultType = moduleTranslation.convertType(ptrDiffOp.getResult().getType()); if (!resultType) - return ptrDiffOp.emitError("Failed to convert result type"); + return ptrDiffOp.emitError("Failed to translate result type"); PtrDiffFlags flags = ptrDiffOp.getFlags(); @@ -408,7 +408,7 @@ public: return translatePtrAddOp(ptrAddOp, builder, moduleTranslation); }) .Case([&](PtrDiffOp ptrDiffOp) { - return convertPtrDiffOp(ptrDiffOp, builder, moduleTranslation); + return translatePtrDiffOp(ptrDiffOp, builder, moduleTranslation); }) .Case([&](LoadOp loadOp) { return translateLoadOp(loadOp, builder, moduleTranslation); |