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

daisytuner / sdfglib / 17300165647

28 Aug 2025 03:14PM UTC coverage: 60.049% (+0.3%) from 59.781%
17300165647

Pull #210

github

web-flow
Merge f6109d03a into 18d34db1e
Pull Request #210: New debug info

377 of 593 new or added lines in 37 files covered. (63.58%)

15 existing lines in 8 files now uncovered.

9588 of 15967 relevant lines covered (60.05%)

114.92 hits per line

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

50.94
/src/passes/debug_info_propagation.cpp
1
#include "sdfg/passes/debug_info_propagation.h"
2
#include "sdfg/debug_info.h"
3

4
namespace sdfg {
5
namespace passes {
6

7
DebugInfoPropagation::DebugInfoPropagation() : Pass() {}
2✔
8

9
void DebugInfoPropagation::
10
    propagate(builder::StructuredSDFGBuilder& builder, structured_control_flow::ControlFlowNode* current) {
4✔
11
    auto current_debug_info = current->debug_info();
4✔
12

13
    if (auto block = dynamic_cast<structured_control_flow::Block*>(current)) {
4✔
14
        auto& graph = block->dataflow();
2✔
15
        for (auto& node : graph.nodes()) {
8✔
16
            current_debug_info = DebugInfoRegion::
6✔
17
                merge(current_debug_info, node.debug_info(), builder.subject().debug_info().instructions());
6✔
18
        }
19
        for (auto& edge : graph.edges()) {
6✔
20
            current_debug_info = DebugInfoRegion::
4✔
21
                merge(current_debug_info, edge.debug_info(), builder.subject().debug_info().instructions());
4✔
22
        }
23
    } else if (auto sequence_stmt = dynamic_cast<structured_control_flow::Sequence*>(current)) {
4✔
24
        for (size_t i = 0; i < sequence_stmt->size(); i++) {
4✔
25
            this->propagate(builder, &sequence_stmt->at(i).first);
2✔
26
            current_debug_info = DebugInfoRegion::merge(
2✔
27
                current_debug_info,
28
                sequence_stmt->at(i).first.debug_info(),
2✔
29
                builder.subject().debug_info().instructions()
2✔
30
            );
31
            current_debug_info = DebugInfoRegion::merge(
2✔
32
                current_debug_info,
33
                sequence_stmt->at(i).second.debug_info(),
2✔
34
                builder.subject().debug_info().instructions()
2✔
35
            );
36
        }
2✔
37
    } else if (auto if_else_stmt = dynamic_cast<structured_control_flow::IfElse*>(current)) {
2✔
38
        for (size_t i = 0; i < if_else_stmt->size(); i++) {
×
NEW
39
            this->propagate(builder, &if_else_stmt->at(i).first);
×
NEW
40
            current_debug_info = DebugInfoRegion::merge(
×
41
                current_debug_info,
NEW
42
                if_else_stmt->at(i).first.debug_info(),
×
NEW
43
                builder.subject().debug_info().instructions()
×
44
            );
45
        }
×
46
    } else if (auto while_stmt = dynamic_cast<structured_control_flow::While*>(current)) {
×
NEW
47
        this->propagate(builder, &while_stmt->root());
×
NEW
48
        current_debug_info = DebugInfoRegion::
×
NEW
49
            merge(current_debug_info, while_stmt->root().debug_info(), builder.subject().debug_info().instructions());
×
50
    } else if (auto loop_stmt = dynamic_cast<structured_control_flow::StructuredLoop*>(current)) {
×
NEW
51
        this->propagate(builder, &loop_stmt->root());
×
NEW
52
        current_debug_info = DebugInfoRegion::
×
NEW
53
            merge(current_debug_info, loop_stmt->root().debug_info(), builder.subject().debug_info().instructions());
×
54
    } else if (auto break_stmt = dynamic_cast<structured_control_flow::Break*>(current)) {
×
NEW
55
        current_debug_info = DebugInfoRegion::
×
NEW
56
            merge(current_debug_info, break_stmt->debug_info(), builder.subject().debug_info().instructions());
×
57
    } else if (auto continue_stmt = dynamic_cast<structured_control_flow::Continue*>(current)) {
×
NEW
58
        current_debug_info = DebugInfoRegion::
×
NEW
59
            merge(current_debug_info, continue_stmt->debug_info(), builder.subject().debug_info().instructions());
×
60
    } else if (auto return_stmt = dynamic_cast<structured_control_flow::Return*>(current)) {
×
NEW
61
        current_debug_info = DebugInfoRegion::
×
NEW
62
            merge(current_debug_info, return_stmt->debug_info(), builder.subject().debug_info().instructions());
×
63
    } else {
×
64
        throw InvalidSDFGException("Unsupported control flow node type");
×
65
    }
66

67
    current->set_debug_info(current_debug_info);
4✔
68
}
4✔
69

70
bool DebugInfoPropagation::run_pass(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
2✔
71
    this->propagate(builder, &builder.subject().root());
2✔
72
    return true;
2✔
73
}
74

75
std::string DebugInfoPropagation::name() { return "DebugInfoPropagation"; }
×
76

77
} // namespace passes
78
} // 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