This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Remove assert from RegionBranchOpInterface verifier
ClosedPublic

Authored by Mogball on Oct 16 2022, 9:28 PM.

Details

Summary

This assert is erroneous because an op implementing
RegionBranchOpInterface can have variadic regions and in some cases
have zero regions, in which case the only possible control flow is
branching from the parent op to itself.

Diff Detail

Event Timeline

Mogball created this revision.Oct 16 2022, 9:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 16 2022, 9:28 PM
Mogball requested review of this revision.Oct 16 2022, 9:28 PM
rriddle accepted this revision.Oct 16 2022, 9:51 PM
This revision is now accepted and ready to land.Oct 16 2022, 9:51 PM

Branching to itself == NOP? (On initial read it sounded like infinite loop)

jpienaar accepted this revision.Oct 17 2022, 4:56 AM

"Branching back to itself" means that control flow goes from "before the op" to "after the op", so yes it'd be NOP