CIRCT 22.0.0git
Loading...
Searching...
No Matches
Passes.h
Go to the documentation of this file.
1//===- Passes.h - FIRRTL pass entry points ----------------------*- 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 header file defines prototypes that expose pass constructors.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_FIRRTL_PASSES_H
14#define CIRCT_DIALECT_FIRRTL_PASSES_H
15
16#include "mlir/Pass/Pass.h"
17#include "mlir/Pass/PassRegistry.h"
18
19namespace mlir {
20class Pass;
21} // namespace mlir
22
23namespace circt {
24namespace firrtl {
25
26/// Configure which aggregate values will be preserved by the LowerTypes pass.
27namespace PreserveAggregate {
29 /// Don't preserve aggregate at all. This has been default behaivor and
30 /// compatible with SFC.
32
33 /// Preserve only 1d vectors of ground type (e.g. UInt<2>[3]).
35
36 /// Preserve only vectors (e.g. UInt<2>[3][3]).
38
39 /// Preserve all aggregate values.
41};
42}
43
44/// Configure which values will be explicitly preserved by the DropNames pass.
45namespace PreserveValues {
47 /// Strip all names. No name on declaration is preserved.
49 /// Don't explicitly preserve any named values. Every named operation could
50 /// be optimized away by the compiler. Unlike `Strip` names could be preserved
51 /// until the end.
53 // Explicitly preserved values with meaningful names. If a name begins with
54 // an "_" it is not considered meaningful.
56 // Explicitly preserve all values. No named operation should be optimized
57 // away by the compiler.
59};
60} // namespace PreserveValues
61
62enum class CompanionMode {
63 // Lower companions to SystemVerilog binds.
64 Bind,
65 // Lower companions to explicit instances. Used when assertions or other
66 // debugging constructs from the companion are to be included in the design.
68 // Drop companion modules, eliminating them from the design.
69 Drop,
70};
71
72#define GEN_PASS_DECL
73#include "circt/Dialect/FIRRTL/Passes.h.inc"
74
75/// Generate the code for registering passes.
76#define GEN_PASS_REGISTRATION
77#include "circt/Dialect/FIRRTL/Passes.h.inc"
78
79} // namespace firrtl
80} // namespace circt
81
82#endif // CIRCT_DIALECT_FIRRTL_PASSES_H
@ All
Preserve all aggregate values.
Definition Passes.h:40
@ OneDimVec
Preserve only 1d vectors of ground type (e.g. UInt<2>[3]).
Definition Passes.h:34
@ Vec
Preserve only vectors (e.g. UInt<2>[3][3]).
Definition Passes.h:37
@ None
Don't preserve aggregate at all.
Definition Passes.h:31
@ None
Don't explicitly preserve any named values.
Definition Passes.h:52
@ Strip
Strip all names. No name on declaration is preserved.
Definition Passes.h:48
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.