This patch is a follow-up on D97217. It adds a new 'Skip' result to the Operation visitor so that a callback can stop the ongoing visit of an operation/block/region and continue visiting the next one without fully interrupting the walk. Skipping is needed to be able to erase an operation/block in pre-order and do not continue visiting the internals of that operation/block. Related to the skipping mechanism, the patch also introduces the following changes: * Added new TestIRVisitors pass with basic testing for the IR visitors. * Fixed missing early increment ranges in visitor implementation. * Updated documentation of walk methods to include erasure information and walk order information. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D97820
6.0 KiB
6.0 KiB