Skip to content

[pull] master from phate:master#506

Merged
pull[bot] merged 1 commit intoEECS-NTNU:masterfrom
phate:master
Oct 12, 2025
Merged

[pull] master from phate:master#506
pull[bot] merged 1 commit intoEECS-NTNU:masterfrom
phate:master

Conversation

@pull
Copy link

@pull pull bot commented Oct 12, 2025

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 : )

…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.
@pull pull bot locked and limited conversation to collaborators Oct 12, 2025
@pull pull bot added the ⤵️ pull label Oct 12, 2025
@pull pull bot merged commit 7fa931e into EECS-NTNU:master Oct 12, 2025
17 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant