This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Verify every LinalgOp has a body.
ClosedPublic

Authored by gysit on Oct 8 2021, 2:47 AM.

Details

Summary

After removing the last LinalgOps that have no region attached we can verify there is a region. The patch performs the following changes:

  • Move the SingleBlockImplicitTerminator trait further up the the structured op base class.
  • Adapt the LinalgOp verification since the trait only check if there is 0 or 1 block.
  • Introduce a getBlock method on the LinalgOp interface.
  • Access the LinalgOp body using either getBlock() or getBody() if the concrete operation type is known.

This patch is a follow up to https://reviews.llvm.org/D111233.

Diff Detail

Event Timeline

gysit created this revision.Oct 8 2021, 2:47 AM
gysit requested review of this revision.Oct 8 2021, 2:47 AM
This revision is now accepted and ready to land.Oct 14 2021, 12:22 AM
gysit updated this revision to Diff 379633.Oct 14 2021, 2:06 AM

Rebase.

This revision was automatically updated to reflect the committed changes.