[Mlir-commits] [mlir] [mlir][llvm] Add llvm.target_features features attribute (PR #71510)
Benjamin Maxwell
llvmlistbot at llvm.org
Tue Nov 7 04:12:14 PST 2023
MacDue wrote:
> All this string manipulation and sorting adds seemingly unnecessary complexity. Have you considered the attribute containing an array of `StringAttr` instead? Common target features can have their `StringAttr` preallocated in the dialect object, so the search would be just comparing a bunch of pointers. Less common features can still rely on string comparison. It will also give this a more MLIResque syntax.
The LLVM attribute is just a string, so to convert between the representations will still require the string manipulation. I can experiment with other representations, but I think having the custom attribute leads to a little nicer API as the related utility functions can be attached to the attribute type.
https://github.com/llvm/llvm-project/pull/71510
More information about the Mlir-commits
mailing list