[MLIR][LLVM] Only disallow inlining for selected function attributes.
authorJohannes de Fine Licht <johannes.definelicht@nextsilicon.com>
Fri, 17 Feb 2023 08:04:43 +0000 (09:04 +0100)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Fri, 17 Feb 2023 08:18:17 +0000 (09:18 +0100)
commita048d7394be54008d0f69506cefa359cfc6117a2
tree6c1c914245bbc0a2cbb7d782091383bf98bff547
parent57c81917d3a596f925f1c072ad04425b66bbd80e
[MLIR][LLVM] Only disallow inlining for selected function attributes.

This loosens the requirement of no passthrough function attribute being
present to checking for specific attributes that prevent inlining. Since
these attributes are no longer strictly passthrough, they should
eventually be upgraded to some form of addressable attributes.

Drops the expensive StringSwitches over call and function attributes in
favor of selectively disallowing attributes that prevent inlining
(similiar to the LLVM inliner), thereby moving to a less conservative
approach.

Reviewed By: gysit

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