HomePhabricator

Add RegionRange for when need to abstract over different region iteration

Authored by jpienaar on Dec 9 2019, 8:57 AM.

Description

Add RegionRange for when need to abstract over different region iteration

Follows ValueRange in representing a generic abstraction over the different
ways to represent a range of Regions. This wrapper is not as ValueRange and only
considers the current cases of interest: MutableArrayRef<Region> and
ArrayRef<std::unique_ptr<Region>> as occurs during op construction vs op region
querying.

Note: ArrayRef<std::unique_ptr<Region>> allows for unset regions, so this range
returns a pointer to a Region instead of a Region.
PiperOrigin-RevId: 284563229

Details

Event Timeline