MLIR  20.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 
20 namespace mlir {
21 namespace detail {
22 class DataLayoutEntryAttrStorage;
23 } // namespace detail
24 } // namespace mlir
25 namespace mlir {
26 namespace 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`.
29 FailureOr<Attribute> query(Operation *op, ArrayRef<DataLayoutEntryKey> keys,
30  bool emitError = false);
31 } // namespace dlti
32 } // namespace mlir
33 
34 #define GET_ATTRDEF_CLASSES
35 #include "mlir/Dialect/DLTI/DLTIAttrs.h.inc"
36 #include "mlir/Dialect/DLTI/DLTIDialect.h.inc"
37 
38 #endif // MLIR_DIALECT_DLTI_DLTI_H
Operation is the basic unit of execution within MLIR.
Definition: Operation.h:88
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:510
Include the generated interface declarations.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.