This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Improve interaction of TypedValue with BlockAndValueMapping
ClosedPublic

Authored by Tyker on Sep 6 2022, 4:55 PM.

Details

Summary

when BlockAndValueMapping::lookup is called with a TypedValue it will assert that the type of the return is correct. which might not always be true.
with this patch calls to BlockAndValueMapping::lookup will cast the argument to Value or Block*.

Diff Detail

Event Timeline

Tyker created this revision.Sep 6 2022, 4:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2022, 4:55 PM
Tyker requested review of this revision.Sep 6 2022, 4:55 PM
rriddle accepted this revision.Sep 6 2022, 5:19 PM
rriddle added inline comments.
mlir/include/mlir/IR/BlockAndValueMapping.h
81
mlir/unittests/IR/BlockAndValueMapping.cpp
18

Please drop all of the mlir::

This revision is now accepted and ready to land.Sep 6 2022, 5:19 PM

Thanks for addressing the issue