1 //===- Utils.h - Transform utilities -----------------------------*- C++-*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "mlir/IR/Operation.h" 10 11 namespace mlir { 12 namespace nvgpu { 13 14 /// Get the indices that the given load/store operation is operating on. 15 Operation::operand_range getIndices(Operation *op); 16 17 /// Set the indices that the given load/store operation is operating on. 18 void setIndices(Operation *op, ArrayRef<Value> indices); 19 20 /// Get the value that is stored by the given store operation. 21 Value getValueStored(Operation *op); 22 23 /// Get the memref that is loaded from/stored into by the given load/store 24 /// operation. 25 Value getMemrefOperand(Operation *op); 26 27 } // namespace nvgpu 28 } // namespace mlir 29