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

daisytuner / docc / 23608172934

26 Mar 2026 05:18PM UTC coverage: 64.437% (+0.3%) from 64.115%
23608172934

Pull #503

github

web-flow
Merge c7d52d496 into 713e440b2
Pull Request #503: Added pass and pipeline statistics

28 of 300 new or added lines in 20 files covered. (9.33%)

506 existing lines in 17 files now uncovered.

27010 of 41917 relevant lines covered (64.44%)

406.1 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::high_resolution_clock::time_point 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) {
574✔
39
    std::chrono::high_resolution_clock::time_point start;
574✔
40
    if (PassStatistics::instance().enabled()) {
574✔
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);
574✔
48
    this->invalidates(analysis_manager, applied);
574✔
49

50
    if (PassStatistics::instance().enabled()) {
574✔
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
574✔
60
    builder.subject().validate();
574✔
61
#endif
574✔
62

63
    return applied;
574✔
64
};
574✔
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) {
574✔
73
    if (applied) {
574✔
74
        analysis_manager.invalidate_all();
238✔
75
    }
238✔
76
};
574✔
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