CIRCT  19.0.0git
FIRAnnotations.h
Go to the documentation of this file.
1 //===- FIRAnnotations.h - .fir file annotation interface --------*- 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 contains private APIs the parser uses to load annotations.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef FIRANNOTATIONS_H
14 #define FIRANNOTATIONS_H
15 
16 #include "circt/Support/LLVM.h"
17 #include "llvm/ADT/SmallVector.h"
18 
19 namespace llvm {
20 namespace json {
21 class Path;
22 class Value;
23 } // namespace json
24 } // namespace llvm
25 
26 namespace mlir {
27 class ArrayAttr;
28 }
29 
30 namespace circt {
31 namespace firrtl {
32 
33 class CircuitOp;
34 class PrintFOp;
35 
36 /// Convert a JSON value containing OMIR JSON (an array of OMNodes), convert
37 /// this to an OMIRAnnotation, and add it to a mutable `annotations` argument.
38 bool fromOMIRJSON(llvm::json::Value &value,
39  SmallVectorImpl<Attribute> &annotations,
40  llvm::json::Path path, MLIRContext *context);
41 
42 /// Handle verif intent captured in printf + when's. Returns failure if any
43 /// encountered, otherwise bool indicates whether the printf was encoding verif
44 /// intent. Mutates the IR, and will delete the PrintFOp when returns true.
45 FailureOr<bool> foldWhenEncodedVerifOp(PrintFOp printOp);
46 
47 } // namespace firrtl
48 } // namespace circt
49 
50 #endif // FIRANNOTATIONS_H
FailureOr< bool > foldWhenEncodedVerifOp(PrintFOp printOp)
Handle verif intent captured in printf + when's.
bool fromOMIRJSON(llvm::json::Value &value, SmallVectorImpl< Attribute > &annotations, llvm::json::Path path, MLIRContext *context)
Convert a JSON value containing OMIR JSON (an array of OMNodes), convert this to an OMIRAnnotation,...
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21