This exposes the ObjectValue Location in the Python bindings using the
C API for MlirLocation. The Location is useful for debugging the
source that created the Object in the first place.
This PR gets rid of the `ltl.disable` op and intrinsic in favor of having an enable operand on the verif assert like ops. This made it trivial to fix an incorrect when condition folding for `AssertProperty`. Most of the PR relates to fixing the chaos that was caused by removing `ltl.disable`.
* Port some of customAssemblyFormat to declarative assembly-format. HW uses unconventional printer so we still need to use a custom directive though.
* Replace manual `get` declarations with TypeBuilderWithInferredContext in several places
* Make banner consistent with others
This pass processes all modules and layers in parallel, and since this
could result in the operation being deleted, could lead to crash when
two side-by-side ops are removed at the same time and try to modify each
other's next and previous pointers. This changes the pass to handle the
part of the specialization which can delete the operation in serial.
This PR adds a CI job that deletes caches created by short integrations tests. Almost 10GB is used by short integrations test and I think it's sufficient to have keep most recent ones. By doing that we should be able to keep cache for nightly-integration tests. This PR adds CI job that calls `gh cache delete $id` for results of `gh cache list -k ccache-short-clang-Release-ON-ON`.
```
gh cache list -k ccache-short-clang-Release-ON-ON -L 50
Showing 27 of 27 caches in llvm/circt
ID KEY SIZE CREATED ACCESSED
66695 ccache-short-clang-Release-ON-ON-2024-0... 360.61 MiB about 10 minutes ago about 10 minutes ago
66694 ccache-short-clang-Release-ON-ON-2024-0... 360.33 MiB about 15 minutes ago about 15 minutes ago
66665 ccache-short-clang-Release-ON-ON-2024-0... 357.96 MiB about 13 hours ago about 22 minutes ago
66692 ccache-short-clang-Release-ON-ON-2024-0... 359.77 MiB about 1 hour ago about 1 hour ago
66675 ccache-short-clang-Release-ON-ON-2024-0... 354.45 MiB about 8 hours ago about 8 hours ago
66674 ccache-short-clang-Release-ON-ON-2024-0... 358.33 MiB about 8 hours ago about 8 hours ago
66673 ccache-short-clang-Release-ON-ON-2024-0... 359.41 MiB about 8 hours ago about 8 hours ago
66672 ccache-short-clang-Release-ON-ON-2024-0... 358.70 MiB about 9 hours ago about 8 hours ago
66667 ccache-short-clang-Release-ON-ON-2024-0... 358.85 MiB about 11 hours ago about 11 hours ago
66663 ccache-short-clang-Release-ON-ON-2024-0... 359.24 MiB about 16 hours ago about 13 hours ago
66664 ccache-short-clang-Release-ON-ON-2024-0... 381.06 MiB about 13 hours ago about 13 hours ago
66597 ccache-short-clang-Release-ON-ON-2024-0... 357.85 MiB about 1 day ago about 14 hours ago
66650 ccache-short-clang-Release-ON-ON-2024-0... 374.79 MiB about 21 hours ago about 16 hours ago
66661 ccache-short-clang-Release-ON-ON-2024-0... 376.57 MiB about 17 hours ago about 17 hours ago
66660 ccache-short-clang-Release-ON-ON-2024-0... 375.24 MiB about 17 hours ago about 17 hours ago
66659 ccache-short-clang-Release-ON-ON-2024-0... 377.82 MiB about 17 hours ago about 17 hours ago
66609 ccache-short-clang-Release-ON-ON-2024-0... 354.95 MiB about 1 day ago about 17 hours ago
66658 ccache-short-clang-Release-ON-ON-2024-0... 359.28 MiB about 17 hours ago about 17 hours ago
66651 ccache-short-clang-Release-ON-ON-2024-0... 358.97 MiB about 20 hours ago about 17 hours ago
66657 ccache-short-clang-Release-ON-ON-2024-0... 375.18 MiB about 19 hours ago about 19 hours ago
66656 ccache-short-clang-Release-ON-ON-2024-0... 364.31 MiB about 20 hours ago about 20 hours ago
66655 ccache-short-clang-Release-ON-ON-2024-0... 369.52 MiB about 20 hours ago about 20 hours ago
66654 ccache-short-clang-Release-ON-ON-2024-0... 363.87 MiB about 20 hours ago about 20 hours ago
66653 ccache-short-clang-Release-ON-ON-2024-0... 369.72 MiB about 20 hours ago about 20 hours ago
66652 ccache-short-clang-Release-ON-ON-2024-0... 374.89 MiB about 20 hours ago about 20 hours ago
66647 ccache-short-clang-Release-ON-ON-2024-0... 374.50 MiB about 21 hours ago about 21 hours ago
66649 ccache-short-clang-Release-ON-ON-2024-0... 361.49 MiB about 21 hours ago about 21 hours ago
```
This annotation helper is more convenient to use due to being variadic,
and slightly more efficient as it will not create an empty array
attribute if the target has no annotations.
We have a fast path when removing annotations that checks if the
underylying array attr is null, which should be impossible. Remove this
code path and add some asserts.
Common pattern of walk/visit many operations looking for annotations
and removing along the way is taking considerable amount of time
in ArrayAttr::get. It may make sense to rework AnnotationSet to
not promise a non-null ArrayAttr but for now add a fast-path
where it matters -- in removeAnnotations(Operation *op, predicate).
Move the `CombDataFlow` op interface from `FIRRTL` to `HW` dialect.
The op interface is better suited to reside in the `HW` dialect, along with
other interfaces like the `HWModuleLike`.
This makes it more convenient for non-`FIRRTL` dialects to implement ops using
this interface, without introducing a new dependence on the `FIRRTL` dialect,
assuming `HW` dependence already exists.
We can't specialize away layers after they are lowered, so this pass was
placed in the wrong spot in the pipeline. It was a last minute change to
move specialize layers after checking for combinational loops which
caused this bug, as we need to make sure that all diagnostic passes run
before we start deleting logic, otherwise we can hide errors from the
user. This adds a few tests that layer specialization is working as
intended, and that it doesn't prevent detection of errors.
As a part of specializing layers we have to remove any HierPathOps which
included a reference to deleted instances. If any member of the path
array is contained in the deleted references list, we need to delete the
op. There was incorrect use of `continue` which caused us to continue
processing the path instead of skipping to the next path operation,
which could lead to a double free when multiple instances in the path
were removed.
This PR fixes an issue that `emitAsTwoStateType` flag was not propagated for aggregate types.
This PR also fixes a bug that ctypes (int/shortint etc) are used as an inner type of packed types (e.g. `int [2:0]` is invalid) according to SV spec 6.8.
LowerDPI checks that improted DPI functions have the same function
signatures over their call sites. This fixes a bug that mistakenly
regards operand types of call op as input types. Call op has clock and
enable operands so operand types are not equal to input types of
DPI functions.
Previously DPICallLowering called `rewriter.replaceAllUsesWith` for individual
results but it seems that is not equivalent to `replaceOp`.
This also adds missing dialect dependency to seq
Close#7191
This adds `StmtExprVisitor` struct for visitor to handle operations with an optional result. Currently `GenericIntrinsicOp `and `DPICallIntrinsicOp` are added.
Besides that `ExpandWhens` is modified to handle DPI intrinsic.
* Fix paths in tests for windows builds
* Fix patterns that check mlir: backslashes are rendered as double backslashes
* Fix fir emitter for output dirs with backslashes
* Try fixing patterns, again
* FIRLexer: parse escaped backslashes in strings
* Fix more patterns with backslashes
* This time, for an absolute path
This PR introduces a PrepareForFormal pass that tries to alleviate some of the heavy lifting being done in the btor emission. For now this only flattens wires, but in the future in will also handle formal contracts and anything else that is done to make emission for formal tools easier, which is why it's part of the verif dialect and not hw.
This is derived from #7150
* Add getDirectoryAttr helper to HWOutputFileAttr
This helper gets the directory component of an output file name, or returns
nullptr if there is none.
* Output directory control v2
Instead of using an explicit precedence declaration anno to help guide the
assignment of floating modules to output directories, use the directory
hierarchy itself. So if a module is used under directory A/B and A/C, it will
be placed into directory A.
* Support absolute output directories for modules
* Add comment
* Make it so output dir annos only apply to public modules
* Simplify lower layers
* Add ability to configure the output directory of assign-output-dirs
* Update tests
* Address review comments
* Clean up whitespace in test
* clang-format
* Fix up firtool integration test excercising dedup + output dirs
* Address review comments