This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add ResultRange::setTypes helper.
AbandonedPublic

Authored by silvas on Oct 16 2020, 1:19 PM.

Details

Reviewers
rriddle
Summary

This makes some code much clearer. The corresponding helpers on
MultiResultTraitBase and Operation are added too.

Also, add a TODO about non-1:1 type conversions.

Diff Detail

Event Timeline

silvas created this revision.Oct 16 2020, 1:19 PM
silvas requested review of this revision.Oct 16 2020, 1:19 PM

Is this common enough to warrant an addition to the API? I looked at upstream usages as well as several downstream projects and found very few usages of setType. I'm mostly apprehensive given the relative danger that setType has.

silvas abandoned this revision.Oct 19 2020, 6:48 PM

Is this common enough to warrant an addition to the API? I looked at upstream usages as well as several downstream projects and found very few usages of setType. I'm mostly apprehensive given the relative danger that setType has.

You're right. It's probably not that common. Abandoning this for now, especially since I abandoned the revision that originally motivated this.