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

daisytuner / docc / 23906044628

02 Apr 2026 02:40PM UTC coverage: 64.553% (+0.08%) from 64.474%
23906044628

Pull #632

github

web-flow
Merge b2698daab into 3125b927b
Pull Request #632: Separate can_be_applied and apply for GPUTilling during Loop Scheduling

282 of 348 new or added lines in 16 files covered. (81.03%)

29 existing lines in 10 files now uncovered.

28998 of 44921 relevant lines covered (64.55%)

453.01 hits per line

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

92.31
/opt/src/passes/collapse_pass.cpp
1
#include "sdfg/passes/collapse_pass.h"
2

3
#include "sdfg/transformations/collapse_to_depth.h"
4

5
namespace sdfg {
6
namespace passes {
7

8
CollapsePass::CollapsePass(std::vector<structured_control_flow::Map*>& maps, size_t target_depth)
9
    : maps_(maps), target_depth_(target_depth) {}
6✔
10

11
bool CollapsePass::run_pass(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
6✔
12
    if (maps_.empty() || target_depth_ == 0) {
6✔
NEW
13
        return false;
×
NEW
14
    }
×
15

16
    // Phase 1: Collect applicable collapses
17
    struct CollapseCandidate {
6✔
18
        size_t map_index;
6✔
19
        transformations::CollapseToDepth collapse;
6✔
20
    };
6✔
21
    std::vector<CollapseCandidate> candidates;
6✔
22

23
    for (size_t i = 0; i < maps_.size(); ++i) {
14✔
24
        transformations::CollapseToDepth collapse(*maps_[i], target_depth_);
8✔
25
        if (collapse.can_be_applied(builder, analysis_manager)) {
8✔
26
            candidates.push_back({i, std::move(collapse)});
2✔
27
        }
2✔
28
    }
8✔
29

30
    if (candidates.empty()) {
6✔
31
        return false;
4✔
32
    }
4✔
33

34
    // Phase 2: Apply all collapses
35
    for (auto& candidate : candidates) {
2✔
36
        candidate.collapse.apply(builder, analysis_manager);
2✔
37
        // Update the map pointer to the collapsed outer loop
38
        maps_[candidate.map_index] = candidate.collapse.outer_loop();
2✔
39
    }
2✔
40
    analysis_manager.invalidate_all();
2✔
41

42
    return true;
2✔
43
}
6✔
44

45
} // namespace passes
46
} // 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