[mlir] Accept an LLVM::LLVMFuncOp in the builder of LLVM::CallOp
authorAlex Zinenko <zinenko@google.com>
Mon, 3 Feb 2020 15:51:16 +0000 (16:51 +0100)
committerAlex Zinenko <zinenko@google.com>
Mon, 3 Feb 2020 21:28:17 +0000 (22:28 +0100)
commit3b4d24d7701484bee32b97d547b11958fee2622b
tree62540910b4ab4234187005baec9e34daf9e63c33
parent15f54d348bcfe2dda91487f0c2664aa308d68934
[mlir] Accept an LLVM::LLVMFuncOp in the builder of LLVM::CallOp

Summary:
Replace the generic zero- and one-result builders in LLVM::CallOp with a custom
builder that takes an LLVMFuncOp, which can be used to extract the result type
and create the symbol reference attribute. This is merely a convenience for
upcoming changes. The ODS-generated builders remain present.

Introduce LLVM::LLVMType::isVoidTy by analogy with the underlying LLVM type.

Differential Revision: https://reviews.llvm.org/D73895
mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp