This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Add return type inference to scf.if builder
ClosedPublic

Authored by frgossen on Jan 17 2023, 6:11 AM.

Diff Detail

Event Timeline

frgossen created this revision.Jan 17 2023, 6:11 AM
frgossen requested review of this revision.Jan 17 2023, 6:11 AM

We cannot generally infer the return type as there are use cases relying on the old behaviour.
In particular, cases which expect an empty yield op to be generated just to replace it afterwards.

Could you perhaps expand on that exception or point to where this is assumed? Are these where during a pass an invalid state is created or is this across passes?

Could you perhaps expand on that exception or point to where this is assumed? Are these where during a pass an invalid state is created or is this across passes?

It's around 100 test failures internally. The cases I looked at were pass-internal.

jpienaar accepted this revision.Jan 17 2023, 8:58 AM

SG, could you add a TODO here documenting this so that we know when we look at it again?

This revision is now accepted and ready to land.Jan 17 2023, 8:58 AM
This revision was landed with ongoing or failed builds.Jan 17 2023, 11:10 AM
This revision was automatically updated to reflect the committed changes.