[mlir] Add a utility iterator range that repeats a given value `n` times.
authorRiver Riddle <riddleriver@gmail.com>
Fri, 21 Feb 2020 21:19:36 +0000 (13:19 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Fri, 21 Feb 2020 23:15:32 +0000 (15:15 -0800)
commit93813e5feb18ece7becd1eece24d0138c955fd53
tree60d2ce31af7364e104e5abe7e4a8bc76444e5ff6
parentca4ea51c0af2dd3f3c73adc587c8e642c9dcdeec
[mlir] Add a utility iterator range that repeats a given value `n` times.

This range is useful when an desired API expects a range or when comparing two different ranges for equality, but the underlying data is a splat. This range removes the need to explicitly construct a vector in those cases.

Differential Revision: https://reviews.llvm.org/D74683
mlir/include/mlir/Support/STLExtras.h