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

daisytuner / sdfglib / 21098544716

17 Jan 2026 05:57PM UTC coverage: 64.664% (-0.06%) from 64.728%
21098544716

push

github

web-flow
Merge pull request #459 from daisytuner/isl-tiling

Adds OMPScheduler and PollyScheduler

220 of 375 new or added lines in 13 files covered. (58.67%)

44 existing lines in 2 files now uncovered.

19129 of 29582 relevant lines covered (64.66%)

788.2 hits per line

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

83.64
/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) {
12✔
8
    auto& loop_analysis = analysis_manager.get<analysis::LoopAnalysis>();
12✔
9
    auto& flop_analysis = analysis_manager.get<analysis::FlopAnalysis>();
12✔
10

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

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

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

32
        auto scheduling_info = scheduling_info_map.at(loop);
24✔
33
        scheduling_info_map.erase(loop);
24✔
34
        if (scheduling_info.loop_info.has_side_effects) {
24✔
NEW
35
            continue;
×
NEW
36
        }
×
37

38
        SchedulerAction action;
24✔
39
        if (auto while_loop = dynamic_cast<structured_control_flow::While*>(loop)) {
24✔
40
            action = schedule(builder, analysis_manager, *while_loop, scheduling_info);
4✔
41
        } else if (auto structured_loop = dynamic_cast<structured_control_flow::StructuredLoop*>(loop)) {
20✔
42
            action = schedule(builder, analysis_manager, *structured_loop, scheduling_info);
20✔
43
        } else {
20✔
NEW
44
            throw InvalidSDFGException("LoopScheduler encountered non-loop in loop analysis.");
×
NEW
45
        }
×
46

47
        switch (action) {
24✔
48
            case SchedulerAction::NEXT: {
16✔
49
                applied = true;
16✔
50
                break;
16✔
NEW
51
            }
×
52
            case SchedulerAction::CHILDREN: {
8✔
53
                auto children = loop_analysis.children(loop);
8✔
54
                if (children.empty()) {
8✔
NEW
55
                    continue;
×
NEW
56
                }
×
57
                for (auto& child : children) {
12✔
58
                    queue.push_front(child);
12✔
59

60
                    SchedulerLoopInfo info;
12✔
61
                    info.loop_info = loop_analysis.loop_info(child);
12✔
62
                    info.flop = flop_analysis.get(child);
12✔
63
                    scheduling_info_map[child] = info;
12✔
64
                }
12✔
65
                break;
8✔
66
            }
8✔
67
        }
24✔
68
    }
24✔
69

70
    return applied;
12✔
71
}
12✔
72

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