[Mlir-commits] [mlir] [mlir][ArmSME] Use ArmSMETypeConverter for all VectorToLLVM patterns (PR #65261)
Markus Böck
llvmlistbot at llvm.org
Mon Sep 4 08:36:57 PDT 2023
================
@@ -83,21 +83,26 @@ void LowerVectorToLLVMPass::runOnOperation() {
// Convert to the LLVM IR dialect.
LowerToLLVMOptions options(&getContext());
options.useOpaquePointers = useOpaquePointers;
- LLVMTypeConverter converter(&getContext(), options);
+
+ LLVMTypeConverter *converter;
+ if (armSME)
+ converter = new arm_sme::ArmSMETypeConverter(&getContext(), options);
+ else
+ converter = new LLVMTypeConverter(&getContext(), options);
----------------
zero9178 wrote:
This is a memory leak. You should at the very least use `std::unique_ptr<LLVMTypeConverter>` here and use `make_unique` in the logic.
https://github.com/llvm/llvm-project/pull/65261
More information about the Mlir-commits
mailing list