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

daisytuner / sdfglib / 21504454773

29 Jan 2026 09:29PM UTC coverage: 66.569% (+0.3%) from 66.308%
21504454773

push

github

web-flow
Merge pull request #487 from daisytuner/python-openmp

improves auto-parallelization for npbench kernels

288 of 371 new or added lines in 6 files covered. (77.63%)

1 existing line in 1 file now uncovered.

23051 of 34627 relevant lines covered (66.57%)

381.71 hits per line

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

85.19
/opt/src/passes/scheduler/loop_scheduler.cpp
1
#include "sdfg/passes/scheduler/loop_scheduler.h"
2

3
namespace sdfg {
4
namespace passes {
5
namespace scheduler {
6

7
bool LoopScheduler::run_pass(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
10✔
8
    auto& loop_analysis = analysis_manager.get<analysis::LoopAnalysis>();
10✔
9
    auto& flop_analysis = analysis_manager.get<analysis::FlopAnalysis>();
10✔
10

11
    // Initialize queue with outermost loops
12
    std::list<structured_control_flow::ControlFlowNode*> queue;
10✔
13
    std::unordered_map<structured_control_flow::ControlFlowNode*, SchedulerLoopInfo> scheduling_info_map;
10✔
14
    for (auto& loop : loop_analysis.outermost_loops()) {
10✔
15
        queue.push_back(loop);
10✔
16

17
        SchedulerLoopInfo info;
10✔
18
        info.loop_info = loop_analysis.loop_info(loop);
10✔
19
        info.flop = flop_analysis.get(loop);
10✔
20
        scheduling_info_map[loop] = info;
10✔
21
    }
10✔
22
    if (queue.empty()) {
10✔
23
        return false;
×
24
    }
×
25

26
    // Scheduling state machine
27
    bool applied = false;
10✔
28
    while (!queue.empty()) {
31✔
29
        auto loop = queue.front();
21✔
30
        queue.pop_front();
21✔
31

32
        auto scheduling_info = scheduling_info_map.at(loop);
21✔
33
        scheduling_info_map.erase(loop);
21✔
34

35
        SchedulerAction action;
21✔
36
        if (scheduling_info.loop_info.has_side_effects) {
21✔
NEW
37
            action = SchedulerAction::CHILDREN;
×
38
        } else if (auto while_loop = dynamic_cast<structured_control_flow::While*>(loop)) {
21✔
39
            action = schedule(builder, analysis_manager, *while_loop, scheduling_info);
3✔
40
        } else if (auto structured_loop = dynamic_cast<structured_control_flow::StructuredLoop*>(loop)) {
18✔
41
            action = schedule(builder, analysis_manager, *structured_loop, scheduling_info);
18✔
42
        } else {
18✔
43
            throw InvalidSDFGException("LoopScheduler encountered non-loop in loop analysis.");
×
44
        }
×
45

46
        switch (action) {
21✔
47
            case SchedulerAction::NEXT: {
14✔
48
                applied = true;
14✔
49
                break;
14✔
50
            }
×
51
            case SchedulerAction::CHILDREN: {
7✔
52
                auto children = loop_analysis.children(loop);
7✔
53
                if (children.empty()) {
7✔
54
                    continue;
×
55
                }
×
56
                for (auto& child : children) {
11✔
57
                    queue.push_front(child);
11✔
58

59
                    SchedulerLoopInfo info;
11✔
60
                    info.loop_info = loop_analysis.loop_info(child);
11✔
61
                    info.flop = flop_analysis.get(child);
11✔
62
                    scheduling_info_map[child] = info;
11✔
63
                }
11✔
64
                break;
7✔
65
            }
7✔
66
        }
21✔
67
    }
21✔
68

69
    return applied;
10✔
70
}
10✔
71

72
} // namespace scheduler
73
} // namespace passes
74
} // 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