This is an archive of the discontinued LLVM Phabricator instance.

[mlir][IR] Add ReverseDominanceIterator for IR walkers
ClosedPublic

Authored by springerm on Mar 15 2023, 3:48 AM.

Details

Summary

Blocks are enumerated depth-first, but post-order. I.e., a block is enumerated when its successors have been enumerated. This iteration style is suitable when deleting blocks in a regions: in the absence of cycles, uses are deleted before their definitions.

Diff Detail

Event Timeline

springerm created this revision.Mar 15 2023, 3:48 AM
springerm requested review of this revision.Mar 15 2023, 3:48 AM
rriddle accepted this revision.Mar 21 2023, 12:05 PM
This revision is now accepted and ready to land.Mar 21 2023, 12:05 PM
This revision was automatically updated to reflect the committed changes.