CIRCT 23.0.0git
Loading...
Searching...
No Matches
RTGOps.h
Go to the documentation of this file.
1//===- RTGOps.h - Declare RTG dialect operations ----------------*- 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// This file declares the operation classes for the RTG dialect.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_RTG_IR_RTGOPS_H
14#define CIRCT_DIALECT_RTG_IR_RTGOPS_H
15
25#include "circt/Support/LLVM.h"
26#include "mlir/Bytecode/BytecodeOpInterface.h"
27#include "mlir/IR/BuiltinOps.h"
28#include "mlir/IR/OpImplementation.h"
29#include "mlir/IR/SymbolTable.h"
30#include "mlir/Interfaces/InferTypeOpInterface.h"
31#include "mlir/Interfaces/SideEffectInterfaces.h"
32
33namespace circt {
34namespace rtg {
35
36/// A custom resource representing the RNG state. Operations that read from or
37/// write to the RNG state should declare effects on this resource to prevent
38/// CSE and DCE.
40 : public mlir::SideEffects::Resource::Base<RNGStateResource> {
41 StringRef getName() const final { return "RTGRNGStateResource"; }
42 bool isAddressable() const override { return false; }
43};
44
45} // namespace rtg
46} // namespace circt
47
48#define GET_OP_CLASSES
49#include "circt/Dialect/RTG/IR/RTG.h.inc"
50
51#endif // CIRCT_DIALECT_RTG_IR_RTGOPS_H
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition rtg.py:1
A custom resource representing the RNG state.
Definition RTGOps.h:40
StringRef getName() const final
Definition RTGOps.h:41
bool isAddressable() const override
Definition RTGOps.h:42