This is an archive of the discontinued LLVM Phabricator instance.

[mlir][DialectConversion] Remove usage of std::distance to track position.
ClosedPublic

Authored by mravishankar on Jul 31 2020, 10:33 PM.

Details

Summary

Remove use of iterator::difference_type to know where to insert a
moved or erased block during undo actions.

Depends On D84795

Diff Detail

Event Timeline

mravishankar created this revision.Jul 31 2020, 10:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 31 2020, 10:33 PM
mravishankar requested review of this revision.Jul 31 2020, 10:33 PM
rriddle accepted this revision.Jul 31 2020, 10:37 PM
rriddle added inline comments.
mlir/lib/Transforms/DialectConversion.cpp
990–994

nit: Can you assign insertAfterBlock to a temporary variable? Would likely help the formatting here.

1016–1017

Same here.

1196

block->getPrevNode()?

This revision is now accepted and ready to land.Jul 31 2020, 10:37 PM
mravishankar marked 2 inline comments as done.

Addressing comments

mlir/lib/Transforms/DialectConversion.cpp
1196

Oh thanks!

This revision was landed with ongoing or failed builds.Aug 3 2020, 10:06 AM
This revision was automatically updated to reflect the committed changes.