Loading [MathJax]/extensions/tex2jax.js
CIRCT 22.0.0git
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AIG.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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#ifndef CIRCT_C_DIALECT_AIG_H
10#define CIRCT_C_DIALECT_AIG_H
11
13#include "mlir-c/IR.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
20MLIR_CAPI_EXPORTED void registerAIGPasses(void);
21
22#define DEFINE_C_API_STRUCT(name, storage) \
23 struct name { \
24 storage *ptr; \
25 }; \
26 typedef struct name name
27
28//===----------------------------------------------------------------------===//
29// LongestPathAnalysis
30//===----------------------------------------------------------------------===//
31
32// Opaque handle to LongestPathObject
33DEFINE_C_API_STRUCT(AIGLongestPathObject, void);
34
35// Opaque handle to LongestPathHistory
36DEFINE_C_API_STRUCT(AIGLongestPathHistory, void);
37
38// Opaque handle to LongestPathDataflowPath
39DEFINE_C_API_STRUCT(AIGLongestPathDataflowPath, void);
40
41// Opaque handle to LongestPathAnalysis
42DEFINE_C_API_STRUCT(AIGLongestPathAnalysis, void);
43
44// Opaque handle to LongestPathCollection
45DEFINE_C_API_STRUCT(AIGLongestPathCollection, void);
46
47#undef DEFINE_C_API_STRUCT
48
49// Create a LongestPathAnalysis for the given module
50MLIR_CAPI_EXPORTED AIGLongestPathAnalysis
51aigLongestPathAnalysisCreate(MlirOperation module, bool traceDebugPoints);
52
53// Destroy a LongestPathAnalysis
54MLIR_CAPI_EXPORTED void
55aigLongestPathAnalysisDestroy(AIGLongestPathAnalysis analysis);
56
57MLIR_CAPI_EXPORTED AIGLongestPathCollection aigLongestPathAnalysisGetAllPaths(
58 AIGLongestPathAnalysis analysis, MlirStringRef moduleName,
59 bool elaboratePaths);
60
61//===----------------------------------------------------------------------===//
62// LongestPathCollection
63//===----------------------------------------------------------------------===//
64
65// Check if the collection is valid
66MLIR_CAPI_EXPORTED bool
67aigLongestPathCollectionIsNull(AIGLongestPathCollection collection);
68
69// Destroy a LongestPathCollection
70MLIR_CAPI_EXPORTED void
71aigLongestPathCollectionDestroy(AIGLongestPathCollection collection);
72
73// Get the number of paths in the collection
74MLIR_CAPI_EXPORTED size_t
75aigLongestPathCollectionGetSize(AIGLongestPathCollection collection);
76
77// Get a specific path from the collection as DataflowPath object
78MLIR_CAPI_EXPORTED AIGLongestPathDataflowPath
79aigLongestPathCollectionGetDataflowPath(AIGLongestPathCollection collection,
80 size_t pathIndex);
81
82//===----------------------------------------------------------------------===//
83// DataflowPath API
84//===----------------------------------------------------------------------===//
85
86MLIR_CAPI_EXPORTED int64_t
87aigLongestPathDataflowPathGetDelay(AIGLongestPathDataflowPath dataflowPath);
88
89MLIR_CAPI_EXPORTED AIGLongestPathObject
90aigLongestPathDataflowPathGetFanIn(AIGLongestPathDataflowPath dataflowPath);
91
92MLIR_CAPI_EXPORTED AIGLongestPathObject
93aigLongestPathDataflowPathGetFanOut(AIGLongestPathDataflowPath dataflowPath);
94
95MLIR_CAPI_EXPORTED AIGLongestPathHistory
96aigLongestPathDataflowPathGetHistory(AIGLongestPathDataflowPath dataflowPath);
97
98MLIR_CAPI_EXPORTED MlirOperation
99aigLongestPathDataflowPathGetRoot(AIGLongestPathDataflowPath dataflowPath);
100
101//===----------------------------------------------------------------------===//
102// History API
103//===----------------------------------------------------------------------===//
104
105MLIR_CAPI_EXPORTED bool
106aigLongestPathHistoryIsEmpty(AIGLongestPathHistory history);
107
108MLIR_CAPI_EXPORTED void
109aigLongestPathHistoryGetHead(AIGLongestPathHistory history,
110 AIGLongestPathObject *object, int64_t *delay,
111 MlirStringRef *comment);
112
113MLIR_CAPI_EXPORTED AIGLongestPathHistory
114aigLongestPathHistoryGetTail(AIGLongestPathHistory history);
115
116//===----------------------------------------------------------------------===//
117// Object API
118//===----------------------------------------------------------------------===//
119
120MLIR_CAPI_EXPORTED IgraphInstancePath
121aigLongestPathObjectGetInstancePath(AIGLongestPathObject object);
122
123MLIR_CAPI_EXPORTED MlirStringRef
124aigLongestPathObjectName(AIGLongestPathObject object);
125
126MLIR_CAPI_EXPORTED size_t
127aigLongestPathObjectBitPos(AIGLongestPathObject object);
128
129#ifdef __cplusplus
130}
131#endif
132
133#endif // CIRCT_C_DIALECT_AIG_H
MLIR_CAPI_EXPORTED void registerAIGPasses(void)
Definition AIG.cpp:34
MLIR_CAPI_EXPORTED AIGLongestPathHistory aigLongestPathDataflowPathGetHistory(AIGLongestPathDataflowPath dataflowPath)
Definition AIG.cpp:166
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(AIG, aig)
MLIR_CAPI_EXPORTED void aigLongestPathHistoryGetHead(AIGLongestPathHistory history, AIGLongestPathObject *object, int64_t *delay, MlirStringRef *comment)
Definition AIG.cpp:187
MLIR_CAPI_EXPORTED AIGLongestPathCollection aigLongestPathAnalysisGetAllPaths(AIGLongestPathAnalysis analysis, MlirStringRef moduleName, bool elaboratePaths)
Definition AIG.cpp:96
MLIR_CAPI_EXPORTED int64_t aigLongestPathDataflowPathGetDelay(AIGLongestPathDataflowPath dataflowPath)
Definition AIG.cpp:143
MLIR_CAPI_EXPORTED MlirStringRef aigLongestPathObjectName(AIGLongestPathObject object)
Definition AIG.cpp:226
MLIR_CAPI_EXPORTED IgraphInstancePath aigLongestPathObjectGetInstancePath(AIGLongestPathObject object)
Definition AIG.cpp:212
MLIR_CAPI_EXPORTED bool aigLongestPathHistoryIsEmpty(AIGLongestPathHistory history)
Definition AIG.cpp:182
MLIR_CAPI_EXPORTED MlirOperation aigLongestPathDataflowPathGetRoot(AIGLongestPathDataflowPath dataflowPath)
Definition AIG.cpp:173
MLIR_CAPI_EXPORTED AIGLongestPathObject aigLongestPathDataflowPathGetFanOut(AIGLongestPathDataflowPath dataflowPath)
Definition AIG.cpp:156
MLIR_CAPI_EXPORTED AIGLongestPathAnalysis aigLongestPathAnalysisCreate(MlirOperation module, bool traceDebugPoints)
Definition AIG.cpp:77
#define DEFINE_C_API_STRUCT(name, storage)
Definition AIG.h:22
MLIR_CAPI_EXPORTED AIGLongestPathObject aigLongestPathDataflowPathGetFanIn(AIGLongestPathDataflowPath dataflowPath)
Definition AIG.cpp:149
MLIR_CAPI_EXPORTED AIGLongestPathDataflowPath aigLongestPathCollectionGetDataflowPath(AIGLongestPathCollection collection, size_t pathIndex)
Definition AIG.cpp:132
MLIR_CAPI_EXPORTED bool aigLongestPathCollectionIsNull(AIGLongestPathCollection collection)
Definition AIG.cpp:117
MLIR_CAPI_EXPORTED void aigLongestPathCollectionDestroy(AIGLongestPathCollection collection)
Definition AIG.cpp:121
MLIR_CAPI_EXPORTED size_t aigLongestPathObjectBitPos(AIGLongestPathObject object)
Definition AIG.cpp:237
MLIR_CAPI_EXPORTED void aigLongestPathAnalysisDestroy(AIGLongestPathAnalysis analysis)
Definition AIG.cpp:91
MLIR_CAPI_EXPORTED AIGLongestPathHistory aigLongestPathHistoryGetTail(AIGLongestPathHistory history)
Definition AIG.cpp:200
MLIR_CAPI_EXPORTED size_t aigLongestPathCollectionGetSize(AIGLongestPathCollection collection)
Definition AIG.cpp:125
Definition aig.py:1