[PATCH] D78788: [MLIR] Modify Analysis op conversion mode to emit errors for all unlegalizable operations.

Lucy Fox via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 22:14:36 PDT 2020


lucyrfox added reviewers: rriddle, mehdi_amini.
lucyrfox added a comment.

Took a first pass at this, but I'm open to different ways of approaching this change. At I've written it now, the basic idea of the Analysis conversion is "we're performing a partial conversion and emitting warnings along the way for any ops that would fail to legalize in a full conversion". Success is returned as long as the partial conversion succeeds. I did it this way because returning failure outright means that the partially converted IR doesn't get emitted, which is useful for debugging.

However, an implication of this is that if the legalization //did// fully succeed, we don't know that based on the Analysis conversion. As a result, I foresee a lot of users running an Analysis conversion immediately followed by a Full conversion, thus incurring an unnecessary pass over the IR. So ideally, this would return success/failure for the full conversion while still outputting the partially converted IR in the failure case.

What do you think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78788/new/

https://reviews.llvm.org/D78788





More information about the llvm-commits mailing list