MLIR 24.0.0git
LLVMConstantOps.h
Go to the documentation of this file.
1//===- LLVMConstantOps.h - LLVM dialect constant ops ------------*- 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// This file declares the ops of op partition `Constant` of the LLVM dialect:
10// the constant-like ops and `llvm.mlir.none`.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_DIALECT_LLVMIR_LLVMCONSTANTOPS_H_
15#define MLIR_DIALECT_LLVMIR_LLVMCONSTANTOPS_H_
16
18
19#define GET_OP_CLASSES
20#include "mlir/Dialect/LLVMIR/LLVMConstantOps.h.inc"
21
22namespace mlir {
23namespace LLVM {
24/// Determines the element type of `type` the way the `llvm.mlir.constant`
25/// verifier does, i.e. by looking through LLVM array types and then through a
26/// `VectorType` or `TensorType`. Everything else is treated as a scalar. Use
27/// this when building a constant so that the attribute and the result type are
28/// compared consistently with the verifier.
29Type getConstantElementType(Type type);
30} // namespace LLVM
31} // namespace mlir
32
33#endif // MLIR_DIALECT_LLVMIR_LLVMCONSTANTOPS_H_
Type getConstantElementType(Type type)
Determines the element type of type the way the llvm.mlir.constant verifier does, i....
Include the generated interface declarations.