CIRCT 20.0.0git
Loading...
Searching...
No Matches
HWArithTypes.cpp
Go to the documentation of this file.
1//===- HWArithTypes.cpp - Implement the HW arithmetic types ..-------------===//
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 implement the HW arithmetic data types.
10//
11//===----------------------------------------------------------------------===//
12
14#include "mlir/IR/BuiltinOps.h"
15
16using namespace circt;
17using namespace hwarith;
18
20 return isa<IntegerType>(type) && !type.isSignlessInteger() &&
21 type.getIntOrFloatBitWidth() > 0;
22}
23
24//===----------------------------------------------------------------------===//
25// TableGen generated logic.
26//===----------------------------------------------------------------------===//
27
28// Provide the autogenerated implementation guts for the type classes.
29#define GET_TYPEDEF_CLASSES
30#include "circt/Dialect/HWArith/HWArithTypes.cpp.inc"
bool isHWArithIntegerType(::mlir::Type type)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.