[Mlir-commits] [mlir] eda52f3 - [mlir][nvvm] Add populate function (nfc)
Guray Ozen
llvmlistbot at llvm.org
Thu Jul 13 05:53:55 PDT 2023
Author: Guray Ozen
Date: 2023-07-13T14:53:51+02:00
New Revision: eda52f3cd347cada5563af0d9ca95f08377c0ebc
URL: https://github.com/llvm/llvm-project/commit/eda52f3cd347cada5563af0d9ca95f08377c0ebc
DIFF: https://github.com/llvm/llvm-project/commit/eda52f3cd347cada5563af0d9ca95f08377c0ebc.diff
LOG: [mlir][nvvm] Add populate function (nfc)
This work adds populate function for the nvvm to llvm conversion pattern.
Reviewed By: kuhar
Differential Revision: https://reviews.llvm.org/D155189
Added:
Modified:
mlir/include/mlir/Conversion/NVVMToLLVM/NVVMToLLVM.h
mlir/lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Conversion/NVVMToLLVM/NVVMToLLVM.h b/mlir/include/mlir/Conversion/NVVMToLLVM/NVVMToLLVM.h
index 00c33dfd776548..383ef61f21d705 100644
--- a/mlir/include/mlir/Conversion/NVVMToLLVM/NVVMToLLVM.h
+++ b/mlir/include/mlir/Conversion/NVVMToLLVM/NVVMToLLVM.h
@@ -19,6 +19,8 @@ class Pass;
#define GEN_PASS_DECL_CONVERTNVVMTOLLVMPASS
#include "mlir/Conversion/Passes.h.inc"
+void populateNVVMToLLVMConversionPatterns(RewritePatternSet &patterns);
+
} // namespace mlir
#endif // MLIR_CONVERSION_NVVMTOLLVM_NVVMTOLLVMPASS_H_
diff --git a/mlir/lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp b/mlir/lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp
index 36c2f3ab2cfb19..330ea77c401295 100644
--- a/mlir/lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp
+++ b/mlir/lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp
@@ -183,7 +183,7 @@ struct ConvertNVVMToLLVMPass
ConversionTarget target(getContext());
target.addLegalDialect<::mlir::LLVM::LLVMDialect>();
RewritePatternSet pattern(&getContext());
- pattern.add<PtxLowering>(pattern.getContext());
+ mlir::populateNVVMToLLVMConversionPatterns(pattern);
if (failed(
applyPartialConversion(getOperation(), target, std::move(pattern))))
signalPassFailure();
@@ -191,3 +191,7 @@ struct ConvertNVVMToLLVMPass
};
} // namespace
+
+void mlir::populateNVVMToLLVMConversionPatterns(RewritePatternSet &patterns) {
+ patterns.add<PtxLowering>(patterns.getContext());
+}
More information about the Mlir-commits
mailing list