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