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

daisytuner / docc / 27981272983

22 Jun 2026 08:18PM UTC coverage: 61.754% (-0.03%) from 61.782%
27981272983

Pull #781

github

web-flow
Merge bddaa3724 into fe87d162b
Pull Request #781: Extend Segformer benchmarks setup

987 of 1432 new or added lines in 62 files covered. (68.92%)

9 existing lines in 7 files now uncovered.

38121 of 61730 relevant lines covered (61.75%)

993.19 hits per line

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

28.3
/sdfg/src/data_flow/library_nodes/stdlib/alloca.cpp
1
#include "sdfg/data_flow/library_nodes/stdlib/alloca.h"
2

3
namespace sdfg {
4
namespace stdlib {
5

6
AllocaNode::AllocaNode(
7
    size_t element_id,
8
    const DebugInfo& debug_info,
9
    const graph::Vertex vertex,
10
    data_flow::DataFlowGraph& parent,
11
    const symbolic::Expression size
12
)
13
    : StdlibNode(
5✔
14
          element_id,
5✔
15
          debug_info,
5✔
16
          vertex,
5✔
17
          parent,
5✔
18
          LibraryNodeType_Alloca,
5✔
19
          {"_ret"},
5✔
20
          {},
5✔
21
          true,
5✔
22
          data_flow::ImplementationType_NONE
5✔
23
      ),
5✔
24
      size_(size) {}
5✔
25

26
const symbolic::Expression AllocaNode::size() const { return size_; }
4✔
27

28
void AllocaNode::validate(const Function& function) const { LibraryNode::validate(function); }
3✔
29

30
symbolic::SymbolSet AllocaNode::symbols() const { return symbolic::atoms(this->size_); }
2✔
31

32
std::unique_ptr<data_flow::DataFlowNode> AllocaNode::
33
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
×
34
    return std::make_unique<AllocaNode>(element_id, debug_info_, vertex, parent, size_);
×
35
}
×
36

37
void AllocaNode::replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) {
×
38
    this->size_ = symbolic::subs(this->size_, old_expression, new_expression);
×
39
}
×
40

NEW
41
void AllocaNode::replace(const symbolic::ExpressionMapping& replacements) {
×
NEW
42
    this->size_ = symbolic::subs(this->size_, replacements);
×
NEW
43
}
×
44

45
nlohmann::json AllocaNodeSerializer::serialize(const data_flow::LibraryNode& library_node) {
×
46
    const AllocaNode& node = static_cast<const AllocaNode&>(library_node);
×
47

48
    nlohmann::json j;
×
49
    j["code"] = node.code().value();
×
50

51
    sdfg::serializer::JSONSerializer serializer;
×
52
    j["size"] = serializer.expression(node.size());
×
53

54
    return j;
×
55
}
×
56

57
data_flow::LibraryNode& AllocaNodeSerializer::deserialize(
58
    const nlohmann::json& j, builder::StructuredSDFGBuilder& builder, structured_control_flow::Block& parent
59
) {
×
60
    assert(j.contains("code"));
×
61
    assert(j.contains("debug_info"));
×
62
    assert(j.contains("size"));
×
63

64
    auto code = j["code"].get<std::string>();
×
65
    if (code != LibraryNodeType_Alloca.value()) {
×
66
        throw InvalidSDFGException("Invalid library node code");
×
67
    }
×
68

69
    sdfg::serializer::JSONSerializer serializer;
×
70
    DebugInfo debug_info = serializer.json_to_debug_info(j["debug_info"]);
×
71

72
    auto size = symbolic::parse(j.at("size"));
×
73

74
    return builder.add_library_node<AllocaNode>(parent, debug_info, size);
×
75
}
×
76

77
AllocaNodeDispatcher::AllocaNodeDispatcher(
78
    codegen::LanguageExtension& language_extension,
79
    const Function& function,
80
    const data_flow::DataFlowGraph& data_flow_graph,
81
    const AllocaNode& node
82
)
83
    : codegen::LibraryNodeDispatcher(language_extension, function, data_flow_graph, node) {}
×
84

85
void AllocaNodeDispatcher::dispatch_code(
86
    codegen::PrettyPrinter& stream,
87
    codegen::PrettyPrinter& globals_stream,
88
    codegen::CodeSnippetFactory& library_snippet_factory
89
) {
×
90
    auto& node = static_cast<const AllocaNode&>(node_);
×
91

92
    stream << node.outputs().at(0);
×
93
    stream << " = ";
×
94
    stream << "alloca(" << language_extension_.expression(node.size()) << ")" << ";";
×
95
    stream << std::endl;
×
96
}
×
97

98
} // namespace stdlib
99
} // 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