This is an archive of the discontinued LLVM Phabricator instance.

[WIP][mlir] Resolve memref dependency in canonicalize pass.
ClosedPublic

Authored by dfki-jugr on May 7 2021, 3:41 AM.

Details

Summary

Splitting the memref dialect lead to an introduction of several dependencies
to avoid compilation issues. The canonicalize pass also depends on the
memref dialect, but it shouldn't. This patch resolves the dependencies
and the unintuitive includes are removed. However, the dependency moves
to the constructor of the std dialect.

Diff Detail

Event Timeline

dfki-jugr created this revision.May 7 2021, 3:41 AM
dfki-jugr requested review of this revision.May 7 2021, 3:41 AM

Thanks!

mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
30

Can you add a comment / TODO on where the dependency is coming from? I assume it is a pattern but it'd be nice to say which one.

silvas accepted this revision.EditedMay 7 2021, 9:55 AM

We should commit this, but it is unfortunate, because now we have a dependency cycle between std and memref, e.g. MemRefDialect::materializeConstant uses mlir::ConstantOp (actually, it seems like a bug that we don't have a dependentDialects for the memref dialect depending on std)

(well, the cycle already existed, this is just formalizing it)

This revision is now accepted and ready to land.May 7 2021, 9:55 AM
herhut resigned from this revision.May 10 2021, 8:09 AM

Is this getting ready to land?

mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
30

Ping on this?