Add a new ValueRange class.
authorRiver Riddle <riverriddle@google.com>
Sat, 7 Dec 2019 04:06:48 +0000 (20:06 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Sat, 7 Dec 2019 04:07:23 +0000 (20:07 -0800)
commit9d1a0c72b4ae54b97809966257bd1b9cb3140dfe
treefcbbbae63f398d3ed68ea4e3c788c4639fc7a15e
parentd27bc1db6a64b6caaf7f64d62a459a595773906b
Add a new ValueRange class.

This class represents a generic abstraction over the different ways to represent a range of Values: ArrayRef<Value *>, operand_range, result_range. This class will allow for removing the many instances of explicit SmallVector<Value *, N> construction. It has the same memory cost as ArrayRef, and only suffers cost from indexing(if+elsing the different underlying representations).

This change only updates a few of the existing usages, with more to be changed in followups; e.g. 'build' API.

PiperOrigin-RevId: 284307996
14 files changed:
mlir/include/mlir/IR/OpImplementation.h
mlir/include/mlir/IR/Operation.h
mlir/include/mlir/IR/PatternMatch.h
mlir/include/mlir/Support/LLVM.h
mlir/include/mlir/Support/STLExtras.h
mlir/include/mlir/Transforms/DialectConversion.h
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
mlir/lib/Dialect/AffineOps/AffineOps.cpp
mlir/lib/Dialect/StandardOps/Ops.cpp
mlir/lib/Dialect/VectorOps/VectorToVector.cpp
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/IR/Operation.cpp
mlir/lib/IR/PatternMatch.cpp
mlir/lib/Transforms/DialectConversion.cpp