• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daisytuner / docc / 24408765437

14 Apr 2026 03:47PM UTC coverage: 64.417% (-0.05%) from 64.469%
24408765437

push

github

web-flow
Add support for DDE to remove mallocs and frees as dead-code when DataOffloadingNodes operate on them (#678)

 + generic modeling for libNodes to declare that an input pointer does not actually escape through them
 + draft of generic modeling of input-pointer access ranges and access types (read-only, full overwrite etc.)
 + DDE: Offload-Transfer-specific handling to reinterpret their fake output edges instead as only indirect writes vie the target pointer
 + DDE: option to disable all the legacy code that requires full UserAnalysis and DataDependencyAnalysis.
 * the new malloc/heap removal in DDE can now remove containers by itself, not relying on DataDependencyAnalysis for that
 * improved builder.clear_node, node can report how to deal with a dead edge, including calling an update method on the node to make it validate again after edge removal.
 + Used for OffloadTransfer nodes to support removing the output edge via dead-code and drop the transfer and maybe the entire node if it does nothing anymore.
 * Offloading: option to quickly disable omitting d2h for read-only data

92 of 162 new or added lines in 11 files covered. (56.79%)

4 existing lines in 3 files now uncovered.

30598 of 47500 relevant lines covered (64.42%)

582.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.47
/sdfg/src/data_flow/library_node.cpp
1
#include "sdfg/data_flow/library_node.h"
2

3
#include <string>
4
#include "sdfg/data_flow/data_flow_graph.h"
5
#include "sdfg/symbolic/symbolic.h"
6
#include "symengine/symengine_rcp.h"
7

8
namespace sdfg {
9
namespace data_flow {
10

11
LibraryNode::LibraryNode(
12
    size_t element_id,
13
    const DebugInfo& debug_info,
14
    const graph::Vertex vertex,
15
    DataFlowGraph& parent,
16
    const LibraryNodeCode& code,
17
    const std::vector<std::string>& outputs,
18
    const std::vector<std::string>& inputs,
19
    const bool side_effect,
20
    const ImplementationType& implementation_type
21
)
22
    : CodeNode(element_id, debug_info, vertex, parent, outputs, inputs), code_(code), side_effect_(side_effect),
1,414✔
23
      implementation_type_(implementation_type) {}
1,414✔
24

25
const LibraryNodeCode& LibraryNode::code() const { return this->code_; };
372✔
26

27
const ImplementationType& LibraryNode::implementation_type() const { return this->implementation_type_; };
13✔
28

29
ImplementationType& LibraryNode::implementation_type() { return this->implementation_type_; };
72✔
30

31
bool LibraryNode::side_effect() const { return this->side_effect_; };
33✔
32

33
std::string LibraryNode::toStr() const { return std::string(this->code_.value()); }
×
34

35
symbolic::Expression LibraryNode::flop() const { return SymEngine::null; }
×
36

37
EdgeRemoveOption LibraryNode::can_remove_out_edge(const data_flow::DataFlowGraph& graph, const Memlet* memlet) const {
2✔
38
    if (graph.out_edges_for_connector(*this, memlet->src_conn()).size() > 1) {
2✔
NEW
39
        return EdgeRemoveOption::Trivially;
×
40
    } else if (!side_effect_ && outputs_.size() == 1) {
2✔
NEW
41
        return EdgeRemoveOption::RemoveNodeAfter;
×
42
    } else {
2✔
43
        // cannot remove the last edge per connector in general
44
        return EdgeRemoveOption::NotRemovable;
2✔
45
    }
2✔
46
}
2✔
47

48
} // namespace data_flow
49
} // namespace sdfg
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc