[pull] master from phate:master#506
Merged
pull[bot] merged 1 commit intoEECS-NTNU:masterfrom Oct 12, 2025
Merged
Conversation
…w/removed inputs (#1310) Makes the `addInput`, `addOutput`, `removeInput` and `removeOutput` methods on `Node` protected, such that subclasses of `Node` have the full control over the creation of inputs and outputs, and can maintain the node looking like expected. This required some changes in passes that directly operated on inputs/outputs/arguments/results, mostly in HLS. The HLS `LoopNode` gets some new methods for creating the different kinds of inputs: - loop variable - loop constant - memory request response The `TestStructuralNode` gets methods to give tests full freedom to do whatever with inputs and outputs. The `addInput` and `removeInput` methods gets an additional `bool notifyRegion`. When the node creates inputs in its constructor, this should be false. When creating inputs outside of the constructor it should be true. Same applies to removing inputs and the destructor. The logic here is that it would be silly to call `notifyInputCreated` for every input we create, when the region has not even been notified about the node being created in the first place. Adding an extra `bool` parameter to `addInput` should have a quite limited blast radius, since the PR locks down the `addInput` API. Lastly, the `addResult` and `addArgument` methods are updated to take `std::unique_ptr<>`, to match the API for `addInput` and `addOutput`. The unique pointer is released on the inside, but I like how the unique pointer makes it crystal clear that ownership is transferred. It also calms down CLion warnings about possibly leaking memory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )