This is an archive of the discontinued LLVM Phabricator instance.

[mlir][ods] Fix OpFormatGen calling inferReturnTypes before region/segment resolution
ClosedPublic

Authored by Mogball on Dec 14 2021, 10:35 PM.

Details

Summary

The generated parser for ops with type inference calls inferReturnTypes before region resolution and segment attribute resolution, i.e. regions and the segment attributes are not passed to the inferReturnTypes even though it may need that information.

In particular, an op that has sized operand segments which queries those operands in its inferReturnTypes function will crash because the segment attributes hadn't been added yet.

Diff Detail

Event Timeline

Mogball created this revision.Dec 14 2021, 10:35 PM
Mogball requested review of this revision.Dec 14 2021, 10:35 PM

Your description is very light on details, please extrapolate what this is fixing/what is broken.

Mogball edited the summary of this revision. (Show Details)Dec 15 2021, 9:03 AM

Yeah sorry >.<

I added some details

rriddle accepted this revision.Dec 15 2021, 6:24 PM

LG, thanks.

This revision is now accepted and ready to land.Dec 15 2021, 6:24 PM