[PATCH] D74119: [NFC][mlir] Adding some helpful EDSC intrinsics

Kern Handa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 23:28:51 PST 2020


kernhanda marked an inline comment as done.
kernhanda added inline comments.


================
Comment at: mlir/include/mlir/EDSC/Intrinsics.h:202
 using call = OperationBuilder<mlir::CallOp>;
+using constant_data = ValueBuilder<ConstantOp>;
 using constant_float = ValueBuilder<ConstantFloatOp>;
----------------
nicolasvasilache wrote:
> ftynse wrote:
> > Please make sure the name corresponds to the instruction name, e.g. ConstantOp should be just `constant`.
> this breaks the build, please fix the other use case: 
> ```
> llvm-project/mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp: In member function ‘virtual mlir::PatternMatchResult {anonymous}::SliceOpConversion::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const’:
> llvm-project/mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp:268:9: error: reference to ‘constant’ is ambiguous
>   268 |         constant(int64Ty, rewriter.getIntegerAttr(rewriter.getIndexType(), 0));
>       |         ^~~~~~~~
> In file included from llvm-project/mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp:20:
> llvm-project/mlir/include/mlir/EDSC/Intrinsics.h:203:7: note: candidates are: ‘using constant = struct mlir::edsc::intrinsics::ValueBuilder<mlir::ConstantOp>’
>   203 | using constant = ValueBuilder<ConstantOp>;
>       |       ^~~~~~~~
> llvm-project/mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp:54:7: note:                 ‘using constant = struct mlir::edsc::intrinsics::ValueBuilder<mlir::LLVM::ConstantOp>’
>    54 | using constant = ValueBuilder<mlir::LLVM::ConstantOp>;
>       |       ^~~~~~~~
> ```
Thanks for catching this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74119/new/

https://reviews.llvm.org/D74119





More information about the llvm-commits mailing list