[mlir] Avoid needlessly converting LLVM named structs with compatible elements
Conversion of LLVM named structs leads to them being renamed since we cannot modify the body of the struct type once it is set. Previously, this applied to all named struct types, even if their element types were not affected by the conversion. Make this behvaior only applicable when element types are changed. This requires making the LLVM dialect type-compatibility check recursively look at the element types (arguably, it should have been doing than since the moment the LLVM dialect type system stopped being closed). In addition, have a more lax check for outer types only to avoid repeated check when necessary (e.g., parser, verifiers that are going to also look at the inner type). Reviewed By: wsmoses Differential Revision: https://reviews.llvm.org/D115037
Loading
Please sign in to comment