MLIR-AIE 1.4.5.dev
AIEVecTypes.cpp
Go to the documentation of this file.
1//===-------- AIEVecTypes.cpp - AIE vector types ----------------*- C++ -*-===//
2//
3// Copyright (C) 2022 Xilinx, Inc.
4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5//
6//===----------------------------------------------------------------------===//
7// This file implements convenience types for AIE vectorization.
8//===----------------------------------------------------------------------===//
9
11#include "aie/Dialect/AIEVec/IR/AIEVecOpsDialect.h.inc"
12#include "mlir/IR/DialectImplementation.h"
13#include "llvm/ADT/TypeSwitch.h"
14
15using namespace mlir;
16using namespace xilinx::aievec;
17
18//===----------------------------------------------------------------------===//
19// TableGen'd type method definitions
20//===----------------------------------------------------------------------===//
21
22#define GET_TYPEDEF_CLASSES
23#include "aie/Dialect/AIEVec/IR/AIEVecOpsTypes.cpp.inc"
24
25void AIEVecDialect::registerTypes() {
26 addTypes<
27#define GET_TYPEDEF_LIST
28#include "aie/Dialect/AIEVec/IR/AIEVecOpsTypes.cpp.inc"
29 >();
30}
31
32//===----------------------------------------------------------------------===//
33// AIE Vector Types
34//===----------------------------------------------------------------------===//
35
36bool AIEVecType::classof(Type type) {
37 return llvm::isa<AIEVecDialect>(type.getDialect());
38}
static bool classof(Type type)
Methods for support type inquiry through isa, cast, and dyn_cast.