Basically did
set(CMAKE_CXX_CLANG_TIDY local/clang-tidy -checks=-*,llvm-use-new-mlir-op-builder -fix)
and then fixed cases where temporary OpBuilders were used (as passed in
by reference now).
Let AnalysisManager provide cached copy if available,
and be open to it being preserved across passes.
Also unnecessary copying of SymbolTable (DenseMap).
* [Calyx][FIRRTL] Put explicit type hints for TypedValue where necessary.
With the introduction of TypedValue in upstream llvm commit
688c51a5acc53b456014e53663051476d825e896, there are now a few cases
where we need to explicitly write the types. In some cases, we need to
explicitly upcast to Value to be consistent with other Values in the
expression, and in other cases, we need to upcast the type parameter of
TypedValue when there are ambiguous implicit conversions.
* [FIRRTL] Replace llvm::GreatestCommonDivisor64 with std::gcd.
GreatestCommonDivisor64 was removed in upstream LLVM in
87c38323a2cff5b26023b24c36a7c01741aba834, and the recommended migration
path is to use std::gcd. This performs an explicit cast to uint64_t for
the same reasons described in 4a2377afd69bcf014492cb665ee955eab3121c4c,
which is that std::gcd may have different and unexpected semantics when
its arguments are of different types and signedness.
* [NFC] Explicitly set dialect accessor prefix to kEmitAccessorPrefix_Raw.
Upstream recently changed the default value of emitAccessorPrefix to
kEmitAccessorPrefix_Prefixed. This patch explicitly sets
emitAccessorPrefix to the previous default value of
kEmitAccessorPrefix_Raw, which will allow us to the new accessor prefix
style more gradually and at our own pace. Upstream will completely
remove the _Raw style in the next couple of months, so we will need to
make the migration soon, though.
See [1] for more information.
[1]: https://discourse.llvm.org/t/psa-ods-generated-accessors-will-change-to-have-a-get-prefix-update-you-apis/4476
* [firtool] Pass config object to new writeBytecodeToFile API.
The third argument to writeBytecodeToFile() now takes a
BytecodeWriterConfig object instead of just the producer string.
* Bump llvm to 13f1bc41888e7d6555c532ba5fa925b9fe3e6b2f.
Comb exists in a place where it might or might not need to deal with Verilog or VHDL weirdness. Some transformations which are desirable might not be semantic preserving with respect to concepts such as 'x'. This is overly strong for a number of languages. An "bin" flag is added to most operations to allow flagging the comb operation as only requiring binary semantics. Frontends by construction, or by analysis can enable this flag to enable richer comb-level optimizations.
Factors out functions for building constants and registers in Calyx programs.
Note: For some reason, this change seems to partially apply canonicalization in the `compile-control.mlir` test wherein constants are moved to the cell-scope.
Changes a cell's instanceName argument from StringAttr to FlatSymbolRefAttr. This will be necessary for the
addition of an InvokeOp, which needs to verify that the instance being invoked actually exists. Since primitives
(namely multi-cycle ones) may also be invokeable, this is required for all cells. This also verifies there is no name
shadowing with symbol names for components and cells.
Adds builders to initialize bodies for IfOp, WhileOp, CombGroupOp, GroupOp, WiresOp, and ControlOp.
This also removes their default builders, since it would be odd to want a Calyx container without a body.
The rest is necessary clean-up in SCFToCalyx and CompileControl. Closes#1884.
* [Calyx] Add IR support for calyx::IfOp
This commit adds support for the Calyx If control operation. The operation takes two arguments; a b boolean SSA value and a group name. The op has two regions, a mandatory 'then' and optional 'else' region.
This is solely for IR support and does not include:
- CalyxEmitter support (unsupported for all control ops as of now)
- CompileControl control FSM generation
Add CompileControl pass for lowering the Calyx dialect to HDL. This pass generates
latency-insensitive finite state machines to realize control flow. Currently, this pass is
only able to compile a single, non-nested Sequential group.