[Mlir-commits] [llvm] [mlir] [mlir] Move InlinerInterface from Transforms to Interfaces. (PR #84878)
Christian Sigg
llvmlistbot at llvm.org
Wed Mar 13 05:59:27 PDT 2024
chsigg wrote:
> I don't know how to model this with Bazel: would you create a "header only target" just for the header inclusion and another one for the link?
You can do that, but then a user of your dialect needs to explicitly add the link target as a dependency. Ideally, the code is structured so targets are self-contained. This isn't hard in this particular case, we can move InliningUtils.h/cpp in a separate target and move on. I was just aiming for the cleaner approach, not expecting that moving the interface would be controversial.
> I don't understand how this creates a circular dependency.
TransformUtils depends on various dialects via ViewLikeInterface and ArithUtils.
> You can always create an InlinerInterface library that lives under Transform/Utils.
That's an option, yes. I just though the interface directory is the better place than Transform/Utils. The InliningInterface only depends on stuff from IR and nothing from Transforms.
> `lib/Transform/Inliner, lib/Transform/Tiling, lib/Transform/Loops` that can come with both the interfaces and the transforms that rely on those.
That seems reasonable to me, but it's a bit of work and will likely break many downstream projects. I'm happy to do this if there is consensus that it's worth the trouble.
https://github.com/llvm/llvm-project/pull/84878
More information about the Mlir-commits
mailing list