diff options
| author | Alex Zinenko <zinenko@google.com> | 2019-12-19 11:34:43 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-19 11:35:57 -0800 |
| commit | efadb6b8388344bcf13b739fdc22dd8812df5b3b (patch) | |
| tree | 83ac0a30532507df12bc8c6d5207a52ecf934086 /mlir/include | |
| parent | 50f9be6d2d62d36a5c7d6d11d8ed413dc91a4fca (diff) | |
| download | bcm5719-llvm-efadb6b8388344bcf13b739fdc22dd8812df5b3b.tar.gz bcm5719-llvm-efadb6b8388344bcf13b739fdc22dd8812df5b3b.zip | |
Detemplatize ModuleTranslation::lookupValues
This function template has been introduced in the early days of MLIR to work
around the absence of common type for ranges of values (operands, block
argumeents, vectors, etc). Core IR now provides ValueRange for exactly this
purpose. Use it instead of the template parameter.
PiperOrigin-RevId: 286431338
Diffstat (limited to 'mlir/include')
| -rw-r--r-- | mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h index da2670af88f..7adb4aac2e2 100644 --- a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h +++ b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h @@ -87,16 +87,8 @@ protected: llvm::IRBuilder<> &builder); static std::unique_ptr<llvm::Module> prepareLLVMModule(Operation *m); - // A helper to look up remapped operands in the value remapping table. - template <typename Range> - SmallVector<llvm::Value *, 8> lookupValues(Range &&values) { - SmallVector<llvm::Value *, 8> remapped; - remapped.reserve(llvm::size(values)); - for (Value *v : values) { - remapped.push_back(valueMapping.lookup(v)); - } - return remapped; - } + /// A helper to look up remapped operands in the value remapping table. + SmallVector<llvm::Value *, 8> lookupValues(ValueRange values); private: /// Check whether the module contains only supported ops directly in its body. |

