[Mlir-commits] [mlir] fd3f251 - [mlir] Catch nonconvertible types in async conversion
Christian Sigg
llvmlistbot at llvm.org
Fri Jun 4 04:54:00 PDT 2021
Author: Christian Sigg
Date: 2021-06-04T13:53:41+02:00
New Revision: fd3f2518a4fe3f9ee52d03eb519bd654c3ce4055
URL: https://github.com/llvm/llvm-project/commit/fd3f2518a4fe3f9ee52d03eb519bd654c3ce4055
DIFF: https://github.com/llvm/llvm-project/commit/fd3f2518a4fe3f9ee52d03eb519bd654c3ce4055.diff
LOG: [mlir] Catch nonconvertible types in async conversion
Reviewed By: ezhulenev, ftynse
Differential Revision: https://reviews.llvm.org/D103592
Added:
Modified:
mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
index a66f246cf55ed..ff2460bb129c4 100644
--- a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
+++ b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
@@ -1059,7 +1059,8 @@ void mlir::populateAsyncStructuralTypeConversionsAndLegality(
ConversionTarget &target) {
typeConverter.addConversion([&](TokenType type) { return type; });
typeConverter.addConversion([&](ValueType type) {
- return ValueType::get(typeConverter.convertType(type.getValueType()));
+ Type converted = typeConverter.convertType(type.getValueType());
+ return converted ? ValueType::get(converted) : converted;
});
patterns.add<ConvertExecuteOpTypes, ConvertAwaitOpTypes, ConvertYieldOpTypes>(
More information about the Mlir-commits
mailing list