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.
Closed by commit rG9c16eef1ec46: [mlir][IR] Add ReverseDominanceIterator for IR walkers (authored by springerm). · Explain WhyMar 22 2023, 1:02 AM
This revision was automatically updated to reflect the committed changes.