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

daisytuner / docc / 23434578971

23 Mar 2026 11:14AM UTC coverage: 63.82% (-0.3%) from 64.115%
23434578971

Pull #503

github

web-flow
Merge 3b8191db4 into 3f0642c14
Pull Request #503: Added pass and pipeline statistics

16 of 217 new or added lines in 4 files covered. (7.37%)

1 existing line in 1 file now uncovered.

26420 of 41398 relevant lines covered (63.82%)

397.84 hits per line

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

29.63
/sdfg/src/passes/pass.cpp
1
#include "sdfg/passes/pass.h"
2

3
#include <chrono>
4

5
#include "sdfg/helpers/helpers.h"
6
#include "sdfg/passes/statistics.h"
7

8
namespace sdfg {
9
namespace passes {
10

11
bool Pass::run(builder::SDFGBuilder& builder, bool create_report) {
×
NEW
12
    std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> start;
×
NEW
13
    if (PassStatistics::instance().enabled()) {
×
NEW
14
        start = std::chrono::high_resolution_clock::now();
×
NEW
15
#ifndef NDEBUG
×
NEW
16
        DEBUG_PRINTLN("Started SDFG Pass '" << this->name() << "' on '" << builder.subject().name() << "'");
×
NEW
17
#endif
×
NEW
18
    }
×
19

UNCOV
20
    bool applied = this->run_pass(builder);
×
21

NEW
22
    if (PassStatistics::instance().enabled()) {
×
NEW
23
        auto end = std::chrono::high_resolution_clock::now();
×
NEW
24
        auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
×
NEW
25
        PassStatistics::instance().add_sdfg_pass(this->name(), duration);
×
NEW
26
#ifndef NDEBUG
×
NEW
27
        DEBUG_PRINTLN("Finished SDFG Pass '" << this->name() << "' in " << duration << " ms");
×
NEW
28
#endif
×
NEW
29
    }
×
30

31
#ifndef NDEBUG
×
32
    builder.subject().validate();
×
33
#endif
×
34

35
    return applied;
×
36
};
×
37

38
bool Pass::run(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager, bool create_report) {
550✔
39
    std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> start;
550✔
40
    if (PassStatistics::instance().enabled()) {
550✔
NEW
41
        start = std::chrono::high_resolution_clock::now();
×
NEW
42
#ifndef NDEBUG
×
NEW
43
        DEBUG_PRINTLN("Started Structured SDFG Pass '" << this->name() << "' on '" << builder.subject().name() << "'");
×
NEW
44
#endif
×
NEW
45
    }
×
46

47
    bool applied = this->run_pass(builder, analysis_manager);
550✔
48
    this->invalidates(analysis_manager, applied);
550✔
49

50
    if (PassStatistics::instance().enabled()) {
550✔
NEW
51
        auto end = std::chrono::high_resolution_clock::now();
×
NEW
52
        auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
×
NEW
53
        PassStatistics::instance().add_structured_sdfg_pass(this->name(), duration);
×
NEW
54
#ifndef NDEBUG
×
NEW
55
        DEBUG_PRINTLN("Finished Structured SDFG Pass '" << this->name() << "' in " << duration << " ms");
×
NEW
56
#endif
×
NEW
57
    }
×
58

59
#ifndef NDEBUG
550✔
60
    builder.subject().validate();
550✔
61
#endif
550✔
62

63
    return applied;
550✔
64
};
550✔
65

66
bool Pass::run_pass(builder::SDFGBuilder& builder) { throw std::logic_error("Not implemented"); };
×
67

68
bool Pass::run_pass(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
×
69
    throw std::logic_error("Not implemented");
×
70
};
×
71

72
void Pass::invalidates(analysis::AnalysisManager& analysis_manager, bool applied) {
550✔
73
    if (applied) {
550✔
74
        analysis_manager.invalidate_all();
229✔
75
    }
229✔
76
};
550✔
77

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