[MLIR][LLVM] Extend argument/result/function attribute support.
authorJohannes de Fine Licht <johannes.definelicht@nextsilicon.com>
Mon, 27 Mar 2023 10:38:29 +0000 (12:38 +0200)
committerJohannes de Fine Licht <johannes.definelicht@nextsilicon.com>
Mon, 27 Mar 2023 10:52:03 +0000 (10:52 +0000)
commitf737d4ad88073d59bdd4ca32ad19c4c7da76ce69
tree3b8bd7a518beb94a819b6624d26bf5e6eb1fdc11
parent352d6fe1eb2214cae974c36ee0b1bbc2cc0f91e3
[MLIR][LLVM] Extend argument/result/function attribute support.

Use a disallowlist approach to deselect attributes on arguments and
return values that are not yet supported, but allow the rest to be
present when inlining.

To achieve fast lookup in `isLegalToInline`, the set of unsupported
function attributes is cached on the inliner interface object during
construction. By using a set of StringAttrs this should just amount to a
pointer lookup.

Depends on D146633

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D146729
mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp
mlir/test/Dialect/LLVMIR/inlining.mlir