MLIR 22.0.0git
DLTI.h
Go to the documentation of this file.
1//===- DLTI.h - Data Layout and Target Info MLIR Dialect --------*- 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// Defines the dialect containing the objects pertaining to target information.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_DIALECT_DLTI_DLTI_H
14#define MLIR_DIALECT_DLTI_DLTI_H
15
16#include "mlir/IR/Attributes.h"
17#include "mlir/IR/Dialect.h"
19
20namespace mlir {
21namespace detail {
23} // namespace detail
24} // namespace mlir
25namespace mlir {
26namespace dlti {
27/// Perform a DLTI-query at `op`, recursively querying each key of `keys` on
28/// query interface-implementing attrs, starting from attr obtained from `op`.
29FailureOr<Attribute> query(Operation *op, ArrayRef<DataLayoutEntryKey> keys,
30 bool emitError = false);
31
32/// Perform a DLTI-query at `op` using each string in `keys` as a separate DLTI
33/// entry key, recursively querying on query interface-implementing attrs,
34/// starting from attr obtained from `op`.
35FailureOr<Attribute> query(Operation *op, ArrayRef<StringRef> keys,
36 bool emitError = false);
37} // namespace dlti
38} // namespace mlir
39
40#define GET_ATTRDEF_CLASSES
41#include "mlir/Dialect/DLTI/DLTIAttrs.h.inc"
42#include "mlir/Dialect/DLTI/DLTIDialect.h.inc"
43
44#endif // MLIR_DIALECT_DLTI_DLTI_H
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88
AttrTypeReplacer.
FailureOr< Attribute > query(Operation *op, ArrayRef< DataLayoutEntryKey > keys, bool emitError=false)
Perform a DLTI-query at op, recursively querying each key of keys on query interface-implementing att...
Definition DLTI.cpp:537
Include the generated interface declarations.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.