This is an archive of the discontinued LLVM Phabricator instance.

Wordsmith RegionBranchOpInterface verification errors
ClosedPublic

Authored by silvas on Sep 8 2020, 3:53 PM.

Details

Summary

I was having a lot of trouble parsing the messages. In particular, the
messages like:

<stdin>:3:8: error: 'scf.if' op  along control flow edge from Region #0 to scf.if source #1 type '!npcomprt.tensor' should match input #1 type 'tensor<?xindex>'

In particular, one thing that kept catching me was parsing the "to scf.if
source #1 type" as one thing, but really it is
"to parent results: source type #1".

Diff Detail

Event Timeline

silvas created this revision.Sep 8 2020, 3:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2020, 3:53 PM
silvas requested review of this revision.Sep 8 2020, 3:53 PM
rriddle accepted this revision.Sep 8 2020, 4:00 PM
This revision is now accepted and ready to land.Sep 8 2020, 4:00 PM
jurahul accepted this revision.Sep 8 2020, 4:10 PM

Looks ok. In general if there is a control flow edge from parent->region, the values flowing along may not necessarily be the parent operands, and if there is control flow edge from a region->parent, the values flowing may not necessarily flow into parent results. But the current RegionBranchOpInterface is designed to model this, so this looks ok.

This revision was automatically updated to reflect the committed changes.