diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..5a86f9024 --- /dev/null +++ b/LICENSE @@ -0,0 +1,234 @@ +============================================================================== +The LLVM Project, CIRCT, and Polygeist are under the Apache License v2.0 with +LLVM Exceptions. As a project that depends on these three projects and that +has made modifications to CIRCT, Dynamatic is under the same license. +============================================================================== + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +---- LLVM Exceptions to the Apache 2.0 License ---- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. + +============================================================================== +Software from third parties included in the LLVM Project: +============================================================================== +The LLVM Project contains third party software which is under different license +terms. All such code will be identified clearly using at least one of two +mechanisms: +1) It will be in a separate directory tree with its own `LICENSE.txt` or + `LICENSE` file at the top containing the specific license and restrictions + which apply to that software, or +2) It will contain specific license and restriction terms at the top of every + file. diff --git a/circt b/circt index 9078772a6..f91554b0e 160000 --- a/circt +++ b/circt @@ -1 +1 @@ -Subproject commit 9078772a61913d23ff3e6f429204ac0d12064ec3 +Subproject commit f91554b0e884930f9f5fb2cee1ead907306ebe7d diff --git a/experimental/include/experimental/InitAllPasses.h b/experimental/include/experimental/InitAllPasses.h index 0b2c2a261..f0c91de6f 100644 --- a/experimental/include/experimental/InitAllPasses.h +++ b/experimental/include/experimental/InitAllPasses.h @@ -1,5 +1,11 @@ //===- InitAllPasses.h - Experimental passes registration --------*- C++-*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file defines a helper to trigger the registration of all experimental // passes defined in the Dynamatic. // diff --git a/experimental/include/experimental/Support/CDGAnalysis.h b/experimental/include/experimental/Support/CDGAnalysis.h index dbae8fba3..bc4bd8223 100644 --- a/experimental/include/experimental/Support/CDGAnalysis.h +++ b/experimental/include/experimental/Support/CDGAnalysis.h @@ -1,5 +1,11 @@ //===- CDGAnalysis.h - Exp. support for CDG analysis -------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the function for CDG analysis. // //===-----------------------------------------------------------------===// diff --git a/experimental/include/experimental/Support/StdProfiler.h b/experimental/include/experimental/Support/StdProfiler.h index da728ad8b..a7510da2d 100644 --- a/experimental/include/experimental/Support/StdProfiler.h +++ b/experimental/include/experimental/Support/StdProfiler.h @@ -1,5 +1,11 @@ //===- StdProfiler.h - std-level profiler -----------------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Declaration of std-level profiler that works in tandem with the std-level // simulator to collect statistics during simulation. // diff --git a/experimental/include/experimental/Transforms/HandshakeFixArgNames.h b/experimental/include/experimental/Transforms/HandshakeFixArgNames.h index 539882967..4768a43a9 100644 --- a/experimental/include/experimental/Transforms/HandshakeFixArgNames.h +++ b/experimental/include/experimental/Transforms/HandshakeFixArgNames.h @@ -1,5 +1,11 @@ //===- HandshakeFixArgNames.h - Match argument names with C --00-*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-fix-arg-names pass. // //===----------------------------------------------------------------------===// diff --git a/experimental/include/experimental/Transforms/Passes.h b/experimental/include/experimental/Transforms/Passes.h index e549db2ac..a0ef0568e 100644 --- a/experimental/include/experimental/Transforms/Passes.h +++ b/experimental/include/experimental/Transforms/Passes.h @@ -1,5 +1,11 @@ //===- Passes.h - Exp. transformation passes registration -------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the registration code for all experimental transformation // passes. // diff --git a/experimental/include/experimental/Transforms/Passes.td b/experimental/include/experimental/Transforms/Passes.td index 7f79d339b..0ddc1484b 100644 --- a/experimental/include/experimental/Transforms/Passes.td +++ b/experimental/include/experimental/Transforms/Passes.td @@ -1,5 +1,11 @@ //===- Passes.td - Exp. transformation passes definition ---*- tablegen -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the definition of all experimental transformation passes. // //===----------------------------------------------------------------------===// diff --git a/experimental/include/experimental/tools/handshake-simulator/ExecModels.h b/experimental/include/experimental/tools/handshake-simulator/ExecModels.h index 2c8703b82..9893805f8 100644 --- a/experimental/include/experimental/tools/handshake-simulator/ExecModels.h +++ b/experimental/include/experimental/tools/handshake-simulator/ExecModels.h @@ -1,6 +1,6 @@ //===- ExecModels.h - Handshake MLIR and Dynamatic Operations -------------===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // @@ -31,7 +31,7 @@ using ModelMap = std::unique_ptr>; /// Maps operations to an internal state everyone can access -using StateMap = llvm::DenseMap; +using StateMap = llvm::DenseMap; /// Data structure to hold memory controllers internal state struct MemoryControllerState { diff --git a/experimental/include/experimental/tools/handshake-simulator/Simulation.h b/experimental/include/experimental/tools/handshake-simulator/Simulation.h index 5c1802e52..2b8a3e520 100644 --- a/experimental/include/experimental/tools/handshake-simulator/Simulation.h +++ b/experimental/include/experimental/tools/handshake-simulator/Simulation.h @@ -1,6 +1,6 @@ //===- Simulation.h - Handshake MLIR Operations ---------------------------===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // @@ -24,12 +24,11 @@ namespace dynamatic { namespace experimental { mlir::LogicalResult simulate(llvm::StringRef toplevelFunction, - llvm::ArrayRef inputArgs, - mlir::OwningOpRef &module, - mlir::MLIRContext &context, - llvm::StringMap &funcMap); -} // namespace dynamatic + llvm::ArrayRef inputArgs, + mlir::OwningOpRef &module, + mlir::MLIRContext &context, + llvm::StringMap &funcMap); } // namespace experimental - +} // namespace dynamatic #endif diff --git a/experimental/lib/Support/CDGAnalysis.cpp b/experimental/lib/Support/CDGAnalysis.cpp index 68ee3d413..6c176aca0 100644 --- a/experimental/lib/Support/CDGAnalysis.cpp +++ b/experimental/lib/Support/CDGAnalysis.cpp @@ -1,8 +1,14 @@ //===- CDGAnalysis.cpp - Exp. support for CDG analysis -----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the function for CDG analysis. // -//===-----------------------------------------------------------------===// +//===----------------------------------------------------------------------===// #include #include diff --git a/experimental/lib/Support/StdProfiler.cpp b/experimental/lib/Support/StdProfiler.cpp index eb8fce5c9..0e843b2c0 100644 --- a/experimental/lib/Support/StdProfiler.cpp +++ b/experimental/lib/Support/StdProfiler.cpp @@ -1,5 +1,11 @@ //===- Simulator.cpp - std-level simulator ----------------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements a function profiler used (at this point) to generate block // transition frequencies for smart buffer placement. // diff --git a/experimental/lib/Transforms/HandshakeFixArgNames.cpp b/experimental/lib/Transforms/HandshakeFixArgNames.cpp index 11cf896b9..3b8f34c77 100644 --- a/experimental/lib/Transforms/HandshakeFixArgNames.cpp +++ b/experimental/lib/Transforms/HandshakeFixArgNames.cpp @@ -1,5 +1,11 @@ //===- HandshakeFixArgNames.cpp - Match argument names with C ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file implements the --handshake-fix-arg-names pass. // //===----------------------------------------------------------------------===// diff --git a/experimental/test/lib/Transforms/TestCDGAnalysis.cpp b/experimental/test/lib/Transforms/TestCDGAnalysis.cpp index 993dfe858..58e78eb3e 100644 --- a/experimental/test/lib/Transforms/TestCDGAnalysis.cpp +++ b/experimental/test/lib/Transforms/TestCDGAnalysis.cpp @@ -1,5 +1,11 @@ //===- TestCDGAnalaysis.cpp - Pass to test CDG analysis ----------- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Test pass for the experimental CDG analysis utilities. Run with // --exp-test-cdg-analysis. // diff --git a/experimental/tools/export-vhdl/export-vhdl.cpp b/experimental/tools/export-vhdl/export-vhdl.cpp index da97319f7..18ed6bfb3 100644 --- a/experimental/tools/export-vhdl/export-vhdl.cpp +++ b/experimental/tools/export-vhdl/export-vhdl.cpp @@ -1,5 +1,11 @@ //===- export-vhdl.cpp - Export VHDL from netlist-level IR ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Experimental tool that exports VHDL from a netlist-level IR expressed in a // combination of the HW and ESI dialects. The result is produced on standart // llvm output. diff --git a/experimental/tools/frequency-profiler/Simulator.cpp b/experimental/tools/frequency-profiler/Simulator.cpp index cbf947ee3..92063cc0f 100644 --- a/experimental/tools/frequency-profiler/Simulator.cpp +++ b/experimental/tools/frequency-profiler/Simulator.cpp @@ -1,6 +1,6 @@ //===- Simulator.cpp - std-level simulator ----------------------*- C++ -*-===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // diff --git a/experimental/tools/frequency-profiler/frequency-profiler.cpp b/experimental/tools/frequency-profiler/frequency-profiler.cpp index e05c2114c..79858fd06 100644 --- a/experimental/tools/frequency-profiler/frequency-profiler.cpp +++ b/experimental/tools/frequency-profiler/frequency-profiler.cpp @@ -1,6 +1,6 @@ //===- frequency-profiler.cpp - Profile std-level code ----------*- C++ -*-===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // diff --git a/experimental/tools/handshake-simulator/ExecModels.cpp b/experimental/tools/handshake-simulator/ExecModels.cpp index 4e08d0471..dc293b772 100644 --- a/experimental/tools/handshake-simulator/ExecModels.cpp +++ b/experimental/tools/handshake-simulator/ExecModels.cpp @@ -1,6 +1,6 @@ //===- HandshakeExecutableOps.cpp - Handshake executable Operations -------===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // @@ -211,11 +211,14 @@ dynamatic::experimental::initialiseMap(llvm::StringMap &funcMap, addDefault(modelStructuresMap); addDefault(modelStructuresMap); addDefault(modelStructuresMap); - addDefault(modelStructuresMap); - addDefault(modelStructuresMap); + addDefault( + modelStructuresMap); + addDefault( + modelStructuresMap); // Dynamatic operations - addDefault(modelStructuresMap); + addDefault( + modelStructuresMap); addDefault(modelStructuresMap); addDefault(modelStructuresMap); addDefault(modelStructuresMap); @@ -410,7 +413,7 @@ bool DynamaticMemController::tryExecute(ExecutableData &data, if (!internalStateExists(opArg, data.stateMap)) setInternalState(opArg, parseOperandIndex(op), data.stateMap); - + MemoryControllerState mcData; getInternalState(opArg, mcData, data.stateMap); @@ -486,7 +489,7 @@ bool DynamaticLoad::tryExecute(ExecutableData &data, circt::Operation &opArg) { // Send address to mem controller if available if (!data.valueMap.count(op.getAddressResult())) memoryTransfer(op.getAddress(), op.getAddressResult(), data); - + // Send data to successor if available if (data.valueMap.count(op.getData())) { memoryTransfer(op.getData(), op.getDataResult(), data); @@ -505,7 +508,7 @@ bool DynamaticStore::tryExecute(ExecutableData &data, circt::Operation &opArg) { setInternalState(opArg, false, data.stateMap); // Sends some data to memory and memorize that the data was sent - auto sendIfAvailable = [&](Value from, Value to) -> bool { + auto sendIfAvailable = [&](Value from, Value to) -> bool { bool otherOperand = false; if (data.valueMap.count(from)) { memoryTransfer(from, to, data); diff --git a/experimental/tools/handshake-simulator/Simulation.cpp b/experimental/tools/handshake-simulator/Simulation.cpp index 5cb80ef01..c59834055 100644 --- a/experimental/tools/handshake-simulator/Simulation.cpp +++ b/experimental/tools/handshake-simulator/Simulation.cpp @@ -1,6 +1,6 @@ //===- Simulation.cpp - Handshake MLIR Operations -----------------------===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "experimental/tools/handshake-simulator/ExecModels.h" #include "experimental/tools/handshake-simulator/Simulation.h" #include "circt/Dialect/Handshake/HandshakeOps.h" #include "circt/Support/JSON.h" +#include "experimental/tools/handshake-simulator/ExecModels.h" #include "mlir/Dialect/Arith/IR/Arith.h" #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h" #include "mlir/Dialect/Func/IR/FuncOps.h" @@ -67,8 +67,8 @@ static void fatalValueError(StringRef reason, T &value) { } /// Debug APInt type MLIR value -static void debugArg(const std::string &head, mlir::Value op, const APInt &value, - double time) { +static void debugArg(const std::string &head, mlir::Value op, + const APInt &value, double time) { LLVM_DEBUG(dbgs() << " " << head << ": " << op << " = " << value << " (APInt<" << value.getBitWidth() << ">) @" << time << "\n"); @@ -76,7 +76,7 @@ static void debugArg(const std::string &head, mlir::Value op, const APInt &value /// Debug MLIR value static void debugArg(const std::string &head, mlir::Value op, const Any &value, - double time) { + double time) { if (auto *val = any_cast(&value)) { debugArg(head, op, *val, time); } else if (auto *val = any_cast(&value)) { @@ -146,7 +146,7 @@ static Any readValueWithType(mlir::Type type, std::string in) { /// Print MLIR value according to it's type static void printAnyValueWithType(llvm::raw_ostream &out, mlir::Type type, - Any &value) { + Any &value) { if (type.isa() || type.isa()) { out << any_cast(value).getSExtValue(); } else if (type.isa()) { @@ -169,8 +169,8 @@ static void printAnyValueWithType(llvm::raw_ostream &out, mlir::Type type, /// Schedules an operation if not already scheduled. static void scheduleIfNeeded(std::list &readyList, - llvm::DenseMap & /*valueMap*/, - circt::Operation *op) { + llvm::DenseMap & /*valueMap*/, + circt::Operation *op) { if (std::find(readyList.begin(), readyList.end(), op) == readyList.end()) { readyList.push_back(op); } @@ -178,8 +178,8 @@ static void scheduleIfNeeded(std::list &readyList, /// Schedules all operations that can be done with the entered value. static void scheduleUses(std::list &readyList, - llvm::DenseMap &valueMap, - mlir::Value value) { + llvm::DenseMap &valueMap, + mlir::Value value) { for (auto &use : value.getUses()) { scheduleIfNeeded(readyList, valueMap, use.getOwner()); } @@ -190,9 +190,9 @@ static void scheduleUses(std::list &readyList, /// store in memRefOffset (i.e. the first dimension index) /// Returns a failed result if the shape isn't uni-dimensional static LogicalResult allocateMemRef(mlir::MemRefType type, std::vector &in, - std::vector> &store, - std::vector &storeTimes, - unsigned &memRefOffset) { + std::vector> &store, + std::vector &storeTimes, + unsigned &memRefOffset) { ArrayRef shape = type.getShape(); if (shape.size() != 1) return failure(); @@ -295,7 +295,7 @@ class HandshakeExecuter { std::vector &); LogicalResult execute(mlir::CallOpInterface, std::vector &, std::vector &); - + private: /// Execution context variables, documented in ExecModels.h llvm::DenseMap &valueMap; @@ -721,12 +721,13 @@ HandshakeExecuter::HandshakeExecuter( std::list readyList; // A map of memory ops llvm::DenseMap memoryMap; - + func.walk([&](Operation *op) { // Set all return flags to false if (isa(op)) { stateMap[op] = false; - // Push the end op, as it contains no operands so never appears in readyList + // Push the end op, as it contains no operands so never appears in + // readyList } else if (isa(op)) { readyList.push_back(op); } @@ -770,9 +771,8 @@ HandshakeExecuter::HandshakeExecuter( // Execute handshake operations if (execModel) { llvm::SmallVector scheduleList; - ExecutableData execData {valueMap, memoryMap, timeMap, - store, scheduleList, models, - stateMap}; + ExecutableData execData{valueMap, memoryMap, timeMap, store, + scheduleList, models, stateMap}; if (!execModel.get()->tryExecute(execData, op)) { readyList.push_back(&op); } else { @@ -792,7 +792,7 @@ HandshakeExecuter::HandshakeExecuter( // If no value is left and we are and the end, leave if (readyList.empty() && isa(op)) return; - + continue; } @@ -833,11 +833,10 @@ HandshakeExecuter::HandshakeExecuter( mlir::arith::DivSIOp, mlir::arith::DivUIOp, mlir::arith::DivFOp, mlir::arith::IndexCastOp, mlir::arith::ExtSIOp, mlir::arith::ExtUIOp, - mlir::arith::XOrIOp>( - [&](auto op) { - strat = ExecuteStrategy::Default; - return execute(op, inValues, outValues); - }) + mlir::arith::XOrIOp>([&](auto op) { + strat = ExecuteStrategy::Default; + return execute(op, inValues, outValues); + }) .Default([&](auto op) { return op->emitOpError() << "Unknown operation"; }); @@ -956,7 +955,8 @@ LogicalResult simulate(StringRef toplevelFunction, std::vector nothing; std::string x; unsigned buffer; - if (allocateMemRef(memreftype, nothing, store, storeTimes, buffer).failed()) + if (allocateMemRef(memreftype, nothing, store, storeTimes, buffer) + .failed()) return failure(); valueMap[blockArgs[i]] = buffer; timeMap[blockArgs[i]] = 0.0; @@ -965,7 +965,8 @@ LogicalResult simulate(StringRef toplevelFunction, std::stringstream arg(inputArgs[i]); while (!arg.eof()) { getline(arg, x, ','); - store[buffer][pos++] = readValueWithType(memreftype.getElementType(), x); + store[buffer][pos++] = + readValueWithType(memreftype.getElementType(), x); } } else { Any value = readValueWithType(type, inputArgs[i]); @@ -978,15 +979,15 @@ LogicalResult simulate(StringRef toplevelFunction, std::vector resultTimes(realOutputs); bool succeeded = false; if (circt::handshake::FuncOp toplevel = - module->lookupSymbol( - toplevelFunction)) { + module->lookupSymbol(toplevelFunction)) { succeeded = HandshakeExecuter(toplevel, valueMap, timeMap, results, resultTimes, store, storeTimes, module, models) .succeeded(); // Final time - circt::handshake::EndOp endOp = *toplevel.getOps().begin(); + circt::handshake::EndOp endOp = + *toplevel.getOps().begin(); assert(endOp && "expected function to terminate with end operation"); double finalTime = any_cast(stateMap[endOp]); simulatedTime += finalTime; // LLVM statistics diff --git a/experimental/tools/handshake-simulator/handshake-simulator.cpp b/experimental/tools/handshake-simulator/handshake-simulator.cpp index 6cf3fd2c0..5615d687e 100644 --- a/experimental/tools/handshake-simulator/handshake-simulator.cpp +++ b/experimental/tools/handshake-simulator/handshake-simulator.cpp @@ -1,6 +1,6 @@ //===- handshake-simulator.cpp - Simulate Handshake-level code --*- C++ -*-===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // @@ -165,6 +165,6 @@ int main(int argc, char **argv) { return 1; } - return int(failed(dynamatic::experimental::simulate(toplevelFunction, inputArgs, module, - context, modelConfigMap))); + return int(failed(dynamatic::experimental::simulate( + toplevelFunction, inputArgs, module, context, modelConfigMap))); } diff --git a/include/dynamatic/Analysis/ConstantAnalysis.h b/include/dynamatic/Analysis/ConstantAnalysis.h index 6697e2c6e..5eaa25060 100644 --- a/include/dynamatic/Analysis/ConstantAnalysis.h +++ b/include/dynamatic/Analysis/ConstantAnalysis.h @@ -1,5 +1,11 @@ //===- ConstantAnalysis.h - Constant analyis utilities ----------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Declares some utility functions useful to analyzing and handling Handshake // constants (circt::handshake::ConstantOp) in dataflow circuits. // diff --git a/include/dynamatic/Analysis/NumericAnalysis.h b/include/dynamatic/Analysis/NumericAnalysis.h index 059b98ef5..f14245e2a 100644 --- a/include/dynamatic/Analysis/NumericAnalysis.h +++ b/include/dynamatic/Analysis/NumericAnalysis.h @@ -1,5 +1,11 @@ //===- NumericAnalysis.h - Numeric analyis utilities ------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Numeric analysis infrastructure. Its main purpose is to try to estimate the // numeric range in which integer-like or floating-like SSA values belong in scf // or cf-level IR. diff --git a/include/dynamatic/Conversion/AffineToScf.h b/include/dynamatic/Conversion/AffineToScf.h index 26773bfec..bdddc7cb7 100644 --- a/include/dynamatic/Conversion/AffineToScf.h +++ b/include/dynamatic/Conversion/AffineToScf.h @@ -1,6 +1,6 @@ //===- AffineToScf.h - Convert Affine to SCF/standard dialect ---*- C++ -*-===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // diff --git a/include/dynamatic/Conversion/HandshakeToNetlist.h b/include/dynamatic/Conversion/HandshakeToNetlist.h index cc18cea5b..076be3a07 100644 --- a/include/dynamatic/Conversion/HandshakeToNetlist.h +++ b/include/dynamatic/Conversion/HandshakeToNetlist.h @@ -1,5 +1,11 @@ //===- HandshakeToNetlist.h - Converts handshake to HW/ESI ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --lower-handshake-to-netlist conversion pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Conversion/PassDetails.h b/include/dynamatic/Conversion/PassDetails.h index ed0ba91fc..7dea1e09c 100644 --- a/include/dynamatic/Conversion/PassDetails.h +++ b/include/dynamatic/Conversion/PassDetails.h @@ -1,5 +1,11 @@ //===- PassDetails.h - Conversion passes class details ----------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This is the header file for all conversion passes defined in Dynamatic. It // contains forward declarations needed by conversion passes and includes // auto-generated base class definitions for all conversion passes. diff --git a/include/dynamatic/Conversion/Passes.h b/include/dynamatic/Conversion/Passes.h index 6cbfd5827..6c484007d 100644 --- a/include/dynamatic/Conversion/Passes.h +++ b/include/dynamatic/Conversion/Passes.h @@ -1,5 +1,11 @@ //===- Passes.h - Conversion passes registration ---------------=*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains declarations to register all conversion passes. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Conversion/Passes.td b/include/dynamatic/Conversion/Passes.td index 8db3f3465..1eafd156a 100644 --- a/include/dynamatic/Conversion/Passes.td +++ b/include/dynamatic/Conversion/Passes.td @@ -1,5 +1,11 @@ //===-- Passes.td - Conversion passes definition ----------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains definitions for all dialect conversion and export passes. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Conversion/ScfToCf.h b/include/dynamatic/Conversion/ScfToCf.h index ec01a6beb..7fd6ab094 100644 --- a/include/dynamatic/Conversion/ScfToCf.h +++ b/include/dynamatic/Conversion/ScfToCf.h @@ -1,5 +1,11 @@ //===- ScfToCf.h - Lower scf ops to unstructured control flow ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --lower-scf-to-cf pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Conversion/StandardToHandshakeFPGA18.h b/include/dynamatic/Conversion/StandardToHandshakeFPGA18.h index 2f11fe7d9..b0380a966 100644 --- a/include/dynamatic/Conversion/StandardToHandshakeFPGA18.h +++ b/include/dynamatic/Conversion/StandardToHandshakeFPGA18.h @@ -1,5 +1,11 @@ //===- StandardToHandshakeFPGA18.h - FPGA18's elastic pass ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --lower-std-to-handshake-fpga18 conversion pass along // with a helper class for performing the lowering. // diff --git a/include/dynamatic/InitAllDialects.h b/include/dynamatic/InitAllDialects.h index fcf789a12..3079c61a4 100644 --- a/include/dynamatic/InitAllDialects.h +++ b/include/dynamatic/InitAllDialects.h @@ -1,5 +1,11 @@ //===- InitAllDialects.h - Dynamatic dialects registration -------*- C++-*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file defines a helper to trigger the registration of all dialects that // Dynamatic users may care about. // diff --git a/include/dynamatic/InitAllPasses.h b/include/dynamatic/InitAllPasses.h index 5ebdc8e52..e4b98c72b 100644 --- a/include/dynamatic/InitAllPasses.h +++ b/include/dynamatic/InitAllPasses.h @@ -1,5 +1,11 @@ //===- InitAllPasses.h - Dynamatic passes registration -----------*- C++-*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file defines a helper to trigger the registration of all passes that // Dynamatic users may care about. // diff --git a/include/dynamatic/Support/DOTPrinter.h b/include/dynamatic/Support/DOTPrinter.h index 94f259fa0..6e04ed510 100644 --- a/include/dynamatic/Support/DOTPrinter.h +++ b/include/dynamatic/Support/DOTPrinter.h @@ -1,5 +1,11 @@ //===- DOTPrinter.h - Print DOT to standard output ------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Declarations for DOT-printing, which at the moment is only used as part of // the export-dot tool. Declares the DOTPrinter, which produces the // Graphviz-formatted representation of an MLIR module on stdout. diff --git a/include/dynamatic/Support/LLVM.h b/include/dynamatic/Support/LLVM.h index 1630a02e2..9027f3625 100644 --- a/include/dynamatic/Support/LLVM.h +++ b/include/dynamatic/Support/LLVM.h @@ -1,5 +1,11 @@ //===- LLVM.h - Import and forward declare core LLVM types ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file forward declares and imports various common LLVM and MLIR datatypes // that we want to use unqualified. // @@ -126,7 +132,8 @@ class Operation; class OpFoldResult; class OpOperand; class OpResult; -template class OwningOpRef; +template +class OwningOpRef; class ParseResult; class Pass; class PatternRewriter; @@ -158,10 +165,14 @@ struct MemRefAccess; struct OperationState; class OperationName; -template class FailureOr; -template class OpConversionPattern; -template class OperationPass; -template struct OpRewritePattern; +template +class FailureOr; +template +class OpConversionPattern; +template +class OperationPass; +template +struct OpRewritePattern; using DefaultTypeStorage = TypeStorage; using OpAsmSetValueNameFn = function_ref; diff --git a/include/dynamatic/Support/Logging.h b/include/dynamatic/Support/Logging.h index cfa2c7039..e9ec7de37 100644 --- a/include/dynamatic/Support/Logging.h +++ b/include/dynamatic/Support/Logging.h @@ -1,5 +1,11 @@ //===- Logging.h - Utilities to create and manage log files -----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Utilities to facilitate interactions with log files by automatically managing // underlying resources. // diff --git a/include/dynamatic/Support/LogicBB.h b/include/dynamatic/Support/LogicBB.h index 48702b69e..c62616635 100644 --- a/include/dynamatic/Support/LogicBB.h +++ b/include/dynamatic/Support/LogicBB.h @@ -1,5 +1,11 @@ //===- LogicBB.h - Infrastructure for working with logical BBs --*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the infrastructure useful for handling logical basic // blocks (logical BBs) in Handshake functions. These are not basic blocks in // the MLIR sense since Handshake function only have a single block. They diff --git a/include/dynamatic/Support/TimingModels.h b/include/dynamatic/Support/TimingModels.h index c661d98ad..48a1d862c 100644 --- a/include/dynamatic/Support/TimingModels.h +++ b/include/dynamatic/Support/TimingModels.h @@ -1,5 +1,11 @@ //===- TimingModels.h - Parse/Represent comp. timing models -----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the infrastrucure to parse, represent, and query timing // models for RTL components, here represented as MLIR operations. The component // timing characterizations that are at the source of our timing models, notably diff --git a/include/dynamatic/Transforms/AnalyzeMemoryAccesses.h b/include/dynamatic/Transforms/AnalyzeMemoryAccesses.h index 88d9e9b96..a1a8f91f6 100644 --- a/include/dynamatic/Transforms/AnalyzeMemoryAccesses.h +++ b/include/dynamatic/Transforms/AnalyzeMemoryAccesses.h @@ -1,5 +1,11 @@ //===- AnalyzeMemoryAccesses.h - Analyze memory accesses --------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --analyze-memory-accesses pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/ArithReduceStrength.h b/include/dynamatic/Transforms/ArithReduceStrength.h index f72890616..7f064211e 100644 --- a/include/dynamatic/Transforms/ArithReduceStrength.h +++ b/include/dynamatic/Transforms/ArithReduceStrength.h @@ -1,5 +1,11 @@ //===- ArithReduceStrength.h - Reduce strength of arith ops -----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --arith-reduce-strength pass as well as some entities // to model a tree of operations (e.g., a tree of adders to replace a multiplier // with). diff --git a/include/dynamatic/Transforms/BufferPlacement/BufferPlacementMILP.h b/include/dynamatic/Transforms/BufferPlacement/BufferPlacementMILP.h index 272fb7c61..3f284577f 100644 --- a/include/dynamatic/Transforms/BufferPlacement/BufferPlacementMILP.h +++ b/include/dynamatic/Transforms/BufferPlacement/BufferPlacementMILP.h @@ -1,5 +1,11 @@ //===- BufferPlacementMILP.h - MILP-based buffer placement ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Infrastructure for MILP-based buffer placement (requires Gurobi). This mainly // declares the BufferPlacementMILP class, which contains all the logic to // setup, optimize, and extract placement decisions from an MILP that represents diff --git a/include/dynamatic/Transforms/BufferPlacement/BufferingProperties.h b/include/dynamatic/Transforms/BufferPlacement/BufferingProperties.h index 2f4ff360d..eb4f6afa0 100644 --- a/include/dynamatic/Transforms/BufferPlacement/BufferingProperties.h +++ b/include/dynamatic/Transforms/BufferPlacement/BufferingProperties.h @@ -1,5 +1,11 @@ //===- BufferingProperties.h - Buffer placement properties ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Infrastructure for specifying and manipulating buffering properties, which // are used by the buffer placement logic to constrain the nature and // positions of buffers in dataflow circuits. diff --git a/include/dynamatic/Transforms/BufferPlacement/CFDFC.h b/include/dynamatic/Transforms/BufferPlacement/CFDFC.h index 320ce357d..8762c8b37 100644 --- a/include/dynamatic/Transforms/BufferPlacement/CFDFC.h +++ b/include/dynamatic/Transforms/BufferPlacement/CFDFC.h @@ -1,5 +1,11 @@ //===- CFDFC.h - Control-Free DataFlow Circuit ------------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Declares data structures and functions to extract and create CFDFCs // (Choice-Free DataFlow Circuits) from a description of a Handshake function's // archs and basic blocks. diff --git a/include/dynamatic/Transforms/BufferPlacement/HandshakePlaceBuffers.h b/include/dynamatic/Transforms/BufferPlacement/HandshakePlaceBuffers.h index 8c1f0edb7..d8cb68a4d 100644 --- a/include/dynamatic/Transforms/BufferPlacement/HandshakePlaceBuffers.h +++ b/include/dynamatic/Transforms/BufferPlacement/HandshakePlaceBuffers.h @@ -1,5 +1,11 @@ //===- HandshakePlaceBuffers.h - Place buffers in DFG -----------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-place-buffers pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/BufferPlacement/HandshakeSetBufferingProperties.h b/include/dynamatic/Transforms/BufferPlacement/HandshakeSetBufferingProperties.h index 47dadafc1..4cc1b98f4 100644 --- a/include/dynamatic/Transforms/BufferPlacement/HandshakeSetBufferingProperties.h +++ b/include/dynamatic/Transforms/BufferPlacement/HandshakeSetBufferingProperties.h @@ -1,5 +1,11 @@ //===- HandshakeSetBufferingProperties.h - Set buf. props. ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-set-buffering-properties pass, which is // useful to run before the buffer placement pass to make sure that all buffer // placement constraints that can be deduced from the IR structure alone are diff --git a/include/dynamatic/Transforms/FlattenMemRefRowMajor.h b/include/dynamatic/Transforms/FlattenMemRefRowMajor.h index 3e665cab1..945e9a5f9 100644 --- a/include/dynamatic/Transforms/FlattenMemRefRowMajor.h +++ b/include/dynamatic/Transforms/FlattenMemRefRowMajor.h @@ -1,5 +1,11 @@ //===- FlattenMemRefRowMajor.h - Flatten memory accesses --------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --flatten-memref-row-major pass, which is almost // identical to CIRCT's --flatten-memref pass but uses row-major indexing for // converting multidimensional load and store operations. diff --git a/include/dynamatic/Transforms/HandshakeCanonicalize.h b/include/dynamatic/Transforms/HandshakeCanonicalize.h index 4aa729fe0..f43d6348e 100644 --- a/include/dynamatic/Transforms/HandshakeCanonicalize.h +++ b/include/dynamatic/Transforms/HandshakeCanonicalize.h @@ -1,5 +1,11 @@ //===- HandshakeCanonicalize.h - Canonicalize Handshake ops -----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-canonicalize pass. // // We use this pass instead of MLIR's generic canonicalization pass to have diff --git a/include/dynamatic/Transforms/HandshakeConcretizeIndexType.h b/include/dynamatic/Transforms/HandshakeConcretizeIndexType.h index 4696fbfa0..65cc342ae 100644 --- a/include/dynamatic/Transforms/HandshakeConcretizeIndexType.h +++ b/include/dynamatic/Transforms/HandshakeConcretizeIndexType.h @@ -1,5 +1,11 @@ //===- HandshakeConcretizeIndexType.h - Index -> Integer --------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-concretize-index-type pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/HandshakeInferBasicBlocks.h b/include/dynamatic/Transforms/HandshakeInferBasicBlocks.h index 269bdd926..a8a41b1d7 100644 --- a/include/dynamatic/Transforms/HandshakeInferBasicBlocks.h +++ b/include/dynamatic/Transforms/HandshakeInferBasicBlocks.h @@ -1,5 +1,11 @@ //===- HandshakeInferBasicBlocks.h - Infer ops basic blocks -----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-infer-basic-blocks pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/HandshakeMinimizeCstWidth.h b/include/dynamatic/Transforms/HandshakeMinimizeCstWidth.h index 3e00e5e27..443afc95b 100644 --- a/include/dynamatic/Transforms/HandshakeMinimizeCstWidth.h +++ b/include/dynamatic/Transforms/HandshakeMinimizeCstWidth.h @@ -1,5 +1,11 @@ //===- HandshakeMinimizeCstWidth.h - Min. constants bitwidth ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-minimize-cst-width pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/HandshakeOptimizeBitwidths.h b/include/dynamatic/Transforms/HandshakeOptimizeBitwidths.h index a21439528..6dcab1e1f 100644 --- a/include/dynamatic/Transforms/HandshakeOptimizeBitwidths.h +++ b/include/dynamatic/Transforms/HandshakeOptimizeBitwidths.h @@ -1,5 +1,11 @@ //===- HandshakeOptimizeBitwidths.h - Optimize channel widths ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-optimize-bitwidths pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/HandshakePrepareForLegacy.h b/include/dynamatic/Transforms/HandshakePrepareForLegacy.h index 291612256..bcc7a4d2c 100644 --- a/include/dynamatic/Transforms/HandshakePrepareForLegacy.h +++ b/include/dynamatic/Transforms/HandshakePrepareForLegacy.h @@ -1,5 +1,11 @@ //===- HandshakePrepareForLegacy.h - Prepare for legacy flow ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --handshake-prepare-for-legacy pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/NameMemoryOps.h b/include/dynamatic/Transforms/NameMemoryOps.h index c56c73805..3a4d4cf5e 100644 --- a/include/dynamatic/Transforms/NameMemoryOps.h +++ b/include/dynamatic/Transforms/NameMemoryOps.h @@ -1,5 +1,11 @@ //===- NameMemoryOps.h - Give a unique name to all memory ops ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --name-memory-ops pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/PassDetails.h b/include/dynamatic/Transforms/PassDetails.h index fb2d89de0..964ad4af9 100644 --- a/include/dynamatic/Transforms/PassDetails.h +++ b/include/dynamatic/Transforms/PassDetails.h @@ -1,5 +1,11 @@ //===- PassDetails.h - Handshake passes class details -----------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This is the header file for all transformation passes defined in Dynamatic. // It contains forward declarations needed by tranformation passes and includes // auto-generated base class definitions for all tranformation passes. diff --git a/include/dynamatic/Transforms/Passes.h b/include/dynamatic/Transforms/Passes.h index 46b0ffdf5..4c1cdb943 100644 --- a/include/dynamatic/Transforms/Passes.h +++ b/include/dynamatic/Transforms/Passes.h @@ -1,5 +1,11 @@ //===- Passes.h - Transformation passes registration ------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains declarations to register transformation passes. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/Passes.td b/include/dynamatic/Transforms/Passes.td index 2d584c780..559850b8d 100644 --- a/include/dynamatic/Transforms/Passes.td +++ b/include/dynamatic/Transforms/Passes.td @@ -1,5 +1,10 @@ //===- Passes.td - Transformation passes definition --------*- tablegen -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// // This file contains definitions for transformation passes. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/PushConstants.h b/include/dynamatic/Transforms/PushConstants.h index 87d0e08dd..068f55c16 100644 --- a/include/dynamatic/Transforms/PushConstants.h +++ b/include/dynamatic/Transforms/PushConstants.h @@ -1,5 +1,11 @@ //===- PushConstants.h - Push constants in using blocks ---------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --push-constants pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/ScfRotateForLoops.h b/include/dynamatic/Transforms/ScfRotateForLoops.h index 673066fa1..d1c7f9314 100644 --- a/include/dynamatic/Transforms/ScfRotateForLoops.h +++ b/include/dynamatic/Transforms/ScfRotateForLoops.h @@ -1,5 +1,11 @@ //===- ScfRotateForLoops.h - Rotate for loops into do-while's ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --scf-rotate-for-loops pass. // //===----------------------------------------------------------------------===// diff --git a/include/dynamatic/Transforms/ScfSimpleIfToSelect.h b/include/dynamatic/Transforms/ScfSimpleIfToSelect.h index 1a1a9c4b7..abac64fb4 100644 --- a/include/dynamatic/Transforms/ScfSimpleIfToSelect.h +++ b/include/dynamatic/Transforms/ScfSimpleIfToSelect.h @@ -1,5 +1,11 @@ //===- ScfSimpleIfToSelect.h - Transform if's into select's -----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --scf-simple-if-to-select pass. // //===----------------------------------------------------------------------===// diff --git a/lib/Analysis/ConstantAnalysis.cpp b/lib/Analysis/ConstantAnalysis.cpp index 017bc8362..8d3f0e876 100644 --- a/lib/Analysis/ConstantAnalysis.cpp +++ b/lib/Analysis/ConstantAnalysis.cpp @@ -1,5 +1,11 @@ //===- ConstantAnalysis.cpp - Constant analyis utilities --------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Definition of Handshake constant analysis infrastructure. // //===----------------------------------------------------------------------===// diff --git a/lib/Analysis/NumericAnalysis.cpp b/lib/Analysis/NumericAnalysis.cpp index 8d57b19b0..f3616a9cc 100644 --- a/lib/Analysis/NumericAnalysis.cpp +++ b/lib/Analysis/NumericAnalysis.cpp @@ -1,5 +1,11 @@ //===- NumericAnalysis.cpp - Numeric analyis utilities ----------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implementation of numeric analysis infrastructure. Right now, ranges are // estimated by "backtracking" values through their def-use chains, which has // strong limitations. In the future, a "forward analysis" may yield better diff --git a/lib/Conversion/AffineToScf/AffineToScf.cpp b/lib/Conversion/AffineToScf/AffineToScf.cpp index 6e3df9b04..cd4ab2d6d 100644 --- a/lib/Conversion/AffineToScf/AffineToScf.cpp +++ b/lib/Conversion/AffineToScf/AffineToScf.cpp @@ -1,6 +1,6 @@ //===- AffineToScf.cpp - Convert Affine to SCF/standard dialect -*- C++ -*-===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // diff --git a/lib/Conversion/HandshakeToNetlist/HandshakeToNetlist.cpp b/lib/Conversion/HandshakeToNetlist/HandshakeToNetlist.cpp index 511ac7e0f..b1ae7f443 100644 --- a/lib/Conversion/HandshakeToNetlist/HandshakeToNetlist.cpp +++ b/lib/Conversion/HandshakeToNetlist/HandshakeToNetlist.cpp @@ -1,5 +1,11 @@ //===- HandshakeToNetlist.cpp - Converts handshake to HW/ESI ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the implementation of the handshake to netlist pass. // //===----------------------------------------------------------------------===// diff --git a/lib/Conversion/ScfToCf/ScfToCf.cpp b/lib/Conversion/ScfToCf/ScfToCf.cpp index bb046f55f..ba5b11897 100644 --- a/lib/Conversion/ScfToCf/ScfToCf.cpp +++ b/lib/Conversion/ScfToCf/ScfToCf.cpp @@ -1,5 +1,11 @@ //===- ScfToCf.cpp - Lower scf ops to unstructured control flow -*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --lower-scf-to-cf conversion pass. It is different from the // upstream --convert-scf-to-cf pass in only one respect: it basically // "overwrites" the for-lowering pattern from the upstream pass with a custom diff --git a/lib/Conversion/StandardToHandshakeFPGA18/StandardToHandshakeFPGA18.cpp b/lib/Conversion/StandardToHandshakeFPGA18/StandardToHandshakeFPGA18.cpp index 322592440..e4cd41dff 100644 --- a/lib/Conversion/StandardToHandshakeFPGA18/StandardToHandshakeFPGA18.cpp +++ b/lib/Conversion/StandardToHandshakeFPGA18/StandardToHandshakeFPGA18.cpp @@ -1,5 +1,11 @@ //===- StandardToHandshakeFPGA18.cpp - FPGA18's elastic pass ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the implementation of the elastic pass, as described in // https://www.epfl.ch/labs/lap/wp-content/uploads/2018/11/JosipovicFeb18_DynamicallyScheduledHighLevelSynthesis_FPGA18.pdf. // The implementation relies for some parts on CIRCT's standard-to-handshake diff --git a/lib/Support/DOTPrinter.cpp b/lib/Support/DOTPrinter.cpp index 6388bc485..d63ac22bd 100644 --- a/lib/Support/DOTPrinter.cpp +++ b/lib/Support/DOTPrinter.cpp @@ -1,5 +1,11 @@ //===- DOTPrinter.cpp - Print DOT to standard output ------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the implementation of the DOT printer. The printer // produces, on standard output, Graphviz-formatted output which contains the // graph representation of the input handshake-level IR. diff --git a/lib/Support/Logging.cpp b/lib/Support/Logging.cpp index 1e8d11367..9e90ffe1e 100644 --- a/lib/Support/Logging.cpp +++ b/lib/Support/Logging.cpp @@ -1,5 +1,11 @@ //===- Logging.cpp - Utilities to create and manage log files ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implementation of logging infrastructure. // //===----------------------------------------------------------------------===// diff --git a/lib/Support/LogicBB.cpp b/lib/Support/LogicBB.cpp index 1ac5d3394..068e29c0b 100644 --- a/lib/Support/LogicBB.cpp +++ b/lib/Support/LogicBB.cpp @@ -1,5 +1,11 @@ //===- LogicBB.cpp - Infrastructure for working w/ logical BBs --*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the infrastructure useful for handling logical basic // blocks (logical BBs) in Handshake functions. // diff --git a/lib/Support/TimingModels.cpp b/lib/Support/TimingModels.cpp index 77f518584..37cedd127 100644 --- a/lib/Support/TimingModels.cpp +++ b/lib/Support/TimingModels.cpp @@ -1,5 +1,11 @@ //===- TimingModels.cpp - Parse/Represent comp. timing models ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Definitions for timing modeling infrastructure, including the LLVM-style // fromJSON functions that deserialize a JSON value into a specific object (see // advanced documentation in ::llvm::json::Value). diff --git a/lib/Transforms/AnalyzeMemoryAccesses.cpp b/lib/Transforms/AnalyzeMemoryAccesses.cpp index e9b43ba35..31eafb7cd 100644 --- a/lib/Transforms/AnalyzeMemoryAccesses.cpp +++ b/lib/Transforms/AnalyzeMemoryAccesses.cpp @@ -1,5 +1,11 @@ //===- AnalyzeMemoryAccesses.cpp - Analyze memory accesses ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --analyze-memory-accesses pass, which determines all // dependences between all pairs of memory accesses in each function. // Information about the dependencies is stored in a MemDependenceArrayAttr diff --git a/lib/Transforms/ArithReduceStrength.cpp b/lib/Transforms/ArithReduceStrength.cpp index 2a8482d65..2456b3fd1 100644 --- a/lib/Transforms/ArithReduceStrength.cpp +++ b/lib/Transforms/ArithReduceStrength.cpp @@ -1,5 +1,11 @@ //===- ArithReduceStrength.cpp - Reduce stregnth of arith ops ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --arith-reduce-strength pass, which greedily applies rewrite // patterns to arithmetic operations to reduce their strength, improving // performance and/or area. diff --git a/lib/Transforms/BufferPlacement/BufferPlacementMILP.cpp b/lib/Transforms/BufferPlacement/BufferPlacementMILP.cpp index b84bab4d0..9b43c2cbb 100644 --- a/lib/Transforms/BufferPlacement/BufferPlacementMILP.cpp +++ b/lib/Transforms/BufferPlacement/BufferPlacementMILP.cpp @@ -1,5 +1,11 @@ //===- BufferPlacementMILP.cpp - MILP-based buffer placement ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements MILP-based buffer placement (requires Gurobi). // //===----------------------------------------------------------------------===// diff --git a/lib/Transforms/BufferPlacement/BufferingProperties.cpp b/lib/Transforms/BufferPlacement/BufferingProperties.cpp index 3d1e7b2e6..7ee977557 100644 --- a/lib/Transforms/BufferPlacement/BufferingProperties.cpp +++ b/lib/Transforms/BufferPlacement/BufferingProperties.cpp @@ -1,5 +1,11 @@ //===- BufferingProperties.cpp - Buffer placement properties ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the infrastructure for specifying and manipulating // channel-specific buffering properties. // diff --git a/lib/Transforms/BufferPlacement/CFDFC.cpp b/lib/Transforms/BufferPlacement/CFDFC.cpp index 843b6aac9..26f37cb4d 100644 --- a/lib/Transforms/BufferPlacement/CFDFC.cpp +++ b/lib/Transforms/BufferPlacement/CFDFC.cpp @@ -1,5 +1,11 @@ //===- CFDFC.cpp - Control-Free DataFlow Circuit ----------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file implements functions related to CFDFC extraction and creation. // //===----------------------------------------------------------------------===// diff --git a/lib/Transforms/BufferPlacement/HandshakePlaceBuffers.cpp b/lib/Transforms/BufferPlacement/HandshakePlaceBuffers.cpp index 4966f5ae2..16b3051af 100644 --- a/lib/Transforms/BufferPlacement/HandshakePlaceBuffers.cpp +++ b/lib/Transforms/BufferPlacement/HandshakePlaceBuffers.cpp @@ -1,5 +1,11 @@ //===- HandshakePlaceBuffers.cpp - Place buffers in DFG ---------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file implements the --place-buffers pass for throughput optimization by // inserting buffers in the data flow graphs. // diff --git a/lib/Transforms/BufferPlacement/HandshakeSetBufferingProperties.cpp b/lib/Transforms/BufferPlacement/HandshakeSetBufferingProperties.cpp index c8842b2b3..436471988 100644 --- a/lib/Transforms/BufferPlacement/HandshakeSetBufferingProperties.cpp +++ b/lib/Transforms/BufferPlacement/HandshakeSetBufferingProperties.cpp @@ -1,5 +1,11 @@ //===- HandshakeSetBufferingProperties.h - Set buf. props. ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --handshake-set-buffering-properties pass. For now there is // only a single policy, but it is expected that more will be defined in the // future. Similarly to the default "fpga20", specifying a new policy amounts to diff --git a/lib/Transforms/FlattenMemRefRowMajor.cpp b/lib/Transforms/FlattenMemRefRowMajor.cpp index c48a108cc..f286edbb0 100644 --- a/lib/Transforms/FlattenMemRefRowMajor.cpp +++ b/lib/Transforms/FlattenMemRefRowMajor.cpp @@ -1,6 +1,6 @@ //===- FlattenMemRefROwMajor.cpp - MemRef flattening pass -------*- C++ -*-===// // -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // diff --git a/lib/Transforms/HandshakeCanonicalize.cpp b/lib/Transforms/HandshakeCanonicalize.cpp index 5d8dec419..29ba241a6 100644 --- a/lib/Transforms/HandshakeCanonicalize.cpp +++ b/lib/Transforms/HandshakeCanonicalize.cpp @@ -1,5 +1,11 @@ //===-HandshakeCanonicalize.cpp - Canonicalize Handshake ops ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements rewrite patterns for the Handshake canonicalization pass, whih are // greedily applied on the IR. These patterns do their best to attach newly // inserted operations to known basic blocks when enough BB information is diff --git a/lib/Transforms/HandshakeConcretizeIndexType.cpp b/lib/Transforms/HandshakeConcretizeIndexType.cpp index 882f7ab7b..7a7e65bdd 100644 --- a/lib/Transforms/HandshakeConcretizeIndexType.cpp +++ b/lib/Transforms/HandshakeConcretizeIndexType.cpp @@ -1,5 +1,11 @@ //===- HandshakeConcretizeIndexType.cpp - Index -> Integer ------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --handshake-concretize-index-type pass, which replaces all // values and attributes of type IndexType with an IntegerType of // machine-specific width. After changing the types of all SSA values in the IR, diff --git a/lib/Transforms/HandshakeInferBasicBlocks.cpp b/lib/Transforms/HandshakeInferBasicBlocks.cpp index 03a88b11b..2594c49e2 100644 --- a/lib/Transforms/HandshakeInferBasicBlocks.cpp +++ b/lib/Transforms/HandshakeInferBasicBlocks.cpp @@ -1,5 +1,11 @@ //===- HandshakeInferBasicBlocks.cpp - Infer ops basic blocks ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // The basic block inference pass is implemented as a single operation // conversion pattern that iterates over all operations in a function repeatedly // until no more inferences can be performed, at which point it succeeds. diff --git a/lib/Transforms/HandshakeMinimizeCstWidth.cpp b/lib/Transforms/HandshakeMinimizeCstWidth.cpp index e543047e7..621bd3b02 100644 --- a/lib/Transforms/HandshakeMinimizeCstWidth.cpp +++ b/lib/Transforms/HandshakeMinimizeCstWidth.cpp @@ -1,5 +1,11 @@ //===- HandshakeMinimizeCstWidth.cpp - Min. constants bitwidth --*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the handshake-minimize-cst-width pass, which minimizes the // bitwidth of all constants. The pass matches on all Handshake constants in the // IR, determines the minimum bitwidth necessary to hold their value, and diff --git a/lib/Transforms/HandshakeOptimizeBitwidths.cpp b/lib/Transforms/HandshakeOptimizeBitwidths.cpp index 0d72eb98f..2dd66c230 100644 --- a/lib/Transforms/HandshakeOptimizeBitwidths.cpp +++ b/lib/Transforms/HandshakeOptimizeBitwidths.cpp @@ -1,5 +1,11 @@ //===- HandshakeOptimizeBitwidths.cpp - Optimize channel widths -*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements a fairly standard bitwidth optimization pass using two set of // rewrite patterns that are applied greedily and recursively on the IR until it // converges. In addition to classical arithmetic optimizations presented, for diff --git a/lib/Transforms/HandshakePrepareForLegacy.cpp b/lib/Transforms/HandshakePrepareForLegacy.cpp index 3ccac1fe7..ebabae41c 100644 --- a/lib/Transforms/HandshakePrepareForLegacy.cpp +++ b/lib/Transforms/HandshakePrepareForLegacy.cpp @@ -1,5 +1,11 @@ //===- HandshakePrepareForLegacy.h - Prepare for legacy flow ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file implements a preprocessing step for handshake-level IR to make it // compatible with the legacy Dynamatic flow (through DOT export). // diff --git a/lib/Transforms/NameMemoryOps.cpp b/lib/Transforms/NameMemoryOps.cpp index f10079cc7..40871147d 100644 --- a/lib/Transforms/NameMemoryOps.cpp +++ b/lib/Transforms/NameMemoryOps.cpp @@ -1,5 +1,11 @@ //===- NameMemoryOps.cpp - Give a unique name to all memory ops -*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --name-memory-ops pass, which sets a MemAccessNameAttr // attribute containing a unique access name on all supported memory operations // in a module (names are unique within the context of each function). This pass diff --git a/lib/Transforms/PushConstants.cpp b/lib/Transforms/PushConstants.cpp index b7f746655..f92ef7d2b 100644 --- a/lib/Transforms/PushConstants.cpp +++ b/lib/Transforms/PushConstants.cpp @@ -1,5 +1,11 @@ //===- PushConstants.cpp - Push constants in using blocks -------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the implementation of the constant pushing pass. // //===----------------------------------------------------------------------===// diff --git a/lib/Transforms/ScfRotateForLoops.cpp b/lib/Transforms/ScfRotateForLoops.cpp index db0164cb6..532c0a995 100644 --- a/lib/Transforms/ScfRotateForLoops.cpp +++ b/lib/Transforms/ScfRotateForLoops.cpp @@ -1,5 +1,11 @@ //===- ScfRotateForLoops.cpp - Rotate for loops into do-while's -*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --scf-rotate-for-loops pass, which tranforms for loops // provably executing at least once into equivalent do-while loops. // diff --git a/lib/Transforms/ScfSimpleIfToSelect.cpp b/lib/Transforms/ScfSimpleIfToSelect.cpp index 73a131a39..907cfd507 100644 --- a/lib/Transforms/ScfSimpleIfToSelect.cpp +++ b/lib/Transforms/ScfSimpleIfToSelect.cpp @@ -1,5 +1,11 @@ //===- ScfSimpleIfToSelect.cpp - Transform if's into select's ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the scf-simple-if-to-select transformation pass using a single // rewrite pattern that matches scf::IfOp operations. To be transformed, matched // if operations must satisfy a number of structural constraints that allow us diff --git a/tools/dynamatic-opt/dynamatic-opt.cpp b/tools/dynamatic-opt/dynamatic-opt.cpp index c5c034f56..4379c835d 100644 --- a/tools/dynamatic-opt/dynamatic-opt.cpp +++ b/tools/dynamatic-opt/dynamatic-opt.cpp @@ -1,5 +1,11 @@ //===- dynamatic-opt.cpp - The dynamatic-opt driver -------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file implements the dynamatic-opt tool, which is the Dynamatic analog of // mlir-opt. It allows access to all compiler passes that Dynamatic users may // care about, that is all passes defined in the superproject as well as certain diff --git a/tools/dynamatic/dynamatic.cpp b/tools/dynamatic/dynamatic.cpp index df22ac8b2..b6ccc93e4 100644 --- a/tools/dynamatic/dynamatic.cpp +++ b/tools/dynamatic/dynamatic.cpp @@ -1,5 +1,11 @@ //===- dynamatic.cpp - Dynamatic frontend -----------------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This tool implements a (barebone, at this point) shell/frontend for // Dynamatic, allowing users to go from C to VHDL using a simple command syntax. // See the sample scripts in samples/ to get an idea of the syntax, or type diff --git a/tools/export-dot/export-dot.cpp b/tools/export-dot/export-dot.cpp index 1b0f7402f..def6e872b 100644 --- a/tools/export-dot/export-dot.cpp +++ b/tools/export-dot/export-dot.cpp @@ -1,5 +1,11 @@ //===- export-dot.cpp - Export Handshake-level IR to DOT --------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file implements the export-dot tool, which outputs on stdout the // Graphviz-formatted representation on an input Handshake-level IR. The tool // may be configured so that its output is compatible with .dot files expected diff --git a/tutorials/include/tutorials/CreatingPasses/Transforms/GreedySimplifyMergeLike.h b/tutorials/include/tutorials/CreatingPasses/Transforms/GreedySimplifyMergeLike.h index 266c0ad1f..9877ec7c7 100644 --- a/tutorials/include/tutorials/CreatingPasses/Transforms/GreedySimplifyMergeLike.h +++ b/tutorials/include/tutorials/CreatingPasses/Transforms/GreedySimplifyMergeLike.h @@ -1,5 +1,11 @@ //===- GreedySimplifyMergeLike.h - Simplifies merge-like ops ----*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --tutorial-handshake-greedy-simplify-merge-like pass. // //===----------------------------------------------------------------------===// diff --git a/tutorials/include/tutorials/CreatingPasses/Transforms/Passes.h b/tutorials/include/tutorials/CreatingPasses/Transforms/Passes.h index 77ba9e74a..98eebba0c 100644 --- a/tutorials/include/tutorials/CreatingPasses/Transforms/Passes.h +++ b/tutorials/include/tutorials/CreatingPasses/Transforms/Passes.h @@ -1,5 +1,11 @@ //===- Passes.h - Transformation passes registration ------------*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains declarations to register transformation passes. // //===----------------------------------------------------------------------===// diff --git a/tutorials/include/tutorials/CreatingPasses/Transforms/Passes.td b/tutorials/include/tutorials/CreatingPasses/Transforms/Passes.td index b6795d92d..d2af8e544 100644 --- a/tutorials/include/tutorials/CreatingPasses/Transforms/Passes.td +++ b/tutorials/include/tutorials/CreatingPasses/Transforms/Passes.td @@ -1,5 +1,11 @@ //===- Passes.td - Transformation passes definition --------*- tablegen -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file contains the definition for all transformation passes in this // tutorial. // diff --git a/tutorials/include/tutorials/CreatingPasses/Transforms/SimplifyMergeLike.h b/tutorials/include/tutorials/CreatingPasses/Transforms/SimplifyMergeLike.h index 6f85a1dce..e83e8a1ce 100644 --- a/tutorials/include/tutorials/CreatingPasses/Transforms/SimplifyMergeLike.h +++ b/tutorials/include/tutorials/CreatingPasses/Transforms/SimplifyMergeLike.h @@ -1,5 +1,11 @@ //===- SimplifyMergeLike.h - Simplifies merge-like operations ---*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file declares the --tutorial-handshake-simplify-merge-like pass. // //===----------------------------------------------------------------------===// diff --git a/tutorials/include/tutorials/InitAllPasses.h b/tutorials/include/tutorials/InitAllPasses.h index 7e947c06d..cf209effe 100644 --- a/tutorials/include/tutorials/InitAllPasses.h +++ b/tutorials/include/tutorials/InitAllPasses.h @@ -1,5 +1,11 @@ //===- InitAllPasses.h - Tutorials passes registration -----------*- C++-*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // This file defines a helper to trigger the registration of all passes defined // in the Dynamatic tutorials. // diff --git a/tutorials/lib/CreatingPasses/Transforms/GreedySimplifyMergeLike.cpp b/tutorials/lib/CreatingPasses/Transforms/GreedySimplifyMergeLike.cpp index 51d2e7cd1..cb5f7056a 100644 --- a/tutorials/lib/CreatingPasses/Transforms/GreedySimplifyMergeLike.cpp +++ b/tutorials/lib/CreatingPasses/Transforms/GreedySimplifyMergeLike.cpp @@ -1,5 +1,11 @@ //===- GreedySimplifyMergeLike.cpp - Simplifies merge-like ops --*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --tutorial-handshake-greedy-simplify-merge-like pass, which // uses a greedy pattern rewriter to modify the IR within each handshake // function. diff --git a/tutorials/lib/CreatingPasses/Transforms/SimplifyMergeLike.cpp b/tutorials/lib/CreatingPasses/Transforms/SimplifyMergeLike.cpp index 7c5a4fe3f..c6d2fe584 100644 --- a/tutorials/lib/CreatingPasses/Transforms/SimplifyMergeLike.cpp +++ b/tutorials/lib/CreatingPasses/Transforms/SimplifyMergeLike.cpp @@ -1,5 +1,11 @@ //===- SimplifyMergeLike.cpp - Simplifies merge-like operations -*- C++ -*-===// // +// Dynamatic is under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// // Implements the --tutorial-handshake-simplify-merge-like pass, which uses a // simple OpBuilder object to modify the IR within each handshake function. //