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

daisytuner / sdfglib / 18691595059

21 Oct 2025 05:00PM UTC coverage: 61.604% (+0.4%) from 61.158%
18691595059

push

github

web-flow
Merge pull request #291 from daisytuner/allocation-hoisting

adds memory allocation hoisting pass

78 of 97 new or added lines in 6 files covered. (80.41%)

1 existing line in 1 file now uncovered.

9458 of 15353 relevant lines covered (61.6%)

92.42 hits per line

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

56.34
/src/passes/pipeline.cpp
1
#include "sdfg/passes/pipeline.h"
2

3
#include "sdfg/passes/schedules/expansion_pass.h"
4

5
namespace sdfg {
6
namespace passes {
7

8
Pipeline::Pipeline(const std::string& name)
12✔
9
    : Pass(), name_(name) {
12✔
10

11
      };
6✔
12

13
std::string Pipeline::name() { return this->name_; };
4✔
14

15
size_t Pipeline::size() const { return this->passes_.size(); };
6✔
16

17
bool Pipeline::run(builder::SDFGBuilder& builder) {
×
18
    bool applied = false;
×
19

20
    bool applied_pipeline;
21
    do {
×
22
        applied_pipeline = false;
×
23
        for (auto& pass : this->passes_) {
×
24
            bool applied_pass = false;
×
25
            do {
×
26
                applied_pass = pass->run(builder);
×
27
                applied_pipeline |= applied_pass;
×
28
            } while (applied_pass);
×
29
        }
30
        applied |= applied_pipeline;
×
31
    } while (applied_pipeline);
×
32

33
    return applied;
×
34
};
35

36
bool Pipeline::run(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
×
37
    bool applied = false;
×
38
    bool applied_pipeline;
39
    do {
×
40
        applied_pipeline = false;
×
41
        for (auto& pass : this->passes_) {
×
42
            bool applied_pass = false;
×
43
            do {
×
44
                applied_pass = pass->run(builder, analysis_manager);
×
45
                applied_pipeline |= applied_pass;
×
46
            } while (applied_pass);
×
47
        }
48
        applied |= applied_pipeline;
×
49
    } while (applied_pipeline);
×
50

51
    return applied;
×
52
};
53

54
Pipeline Pipeline::expression_combine() {
1✔
55
    Pipeline p("ExpressionCombine");
1✔
56

57
    p.register_pass<SymbolPropagation>();
1✔
58
    p.register_pass<ConstantElimination>();
1✔
59
    p.register_pass<DeadDataElimination>();
1✔
60
    p.register_pass<SymbolEvolution>();
1✔
61

62
    return p;
1✔
63
};
1✔
64

65
Pipeline Pipeline::memlet_combine() {
1✔
66
    Pipeline p("MemletCombine");
1✔
67

68
    p.register_pass<ReferencePropagation>();
1✔
69
    p.register_pass<DeadReferenceElimination>();
1✔
70
    p.register_pass<ByteReferenceElimination>();
1✔
71

72
    return p;
1✔
73
};
1✔
74

75
Pipeline Pipeline::controlflow_simplification() {
1✔
76
    Pipeline p("ControlFlowSimplification");
1✔
77

78
    p.register_pass<DeadCFGElimination>();
1✔
79
    p.register_pass<BlockFusionPass>();
1✔
80
    p.register_pass<SequenceFusion>();
1✔
81
    p.register_pass<ConditionEliminationPass>();
1✔
82

83
    return p;
1✔
84
};
1✔
85

86
Pipeline Pipeline::data_parallelism() {
1✔
87
    Pipeline p("DataParallelism");
1✔
88

89
    p.register_pass<For2MapPass>();
1✔
90
    p.register_pass<SymbolPropagation>();
1✔
91
    p.register_pass<DeadDataElimination>();
1✔
92

93
    return p;
1✔
94
};
1✔
95

NEW
96
Pipeline Pipeline::memory() {
×
NEW
97
    Pipeline p("Memory");
×
98

NEW
99
    p.register_pass<AllocationHoistingPass>();
×
100

NEW
101
    return p;
×
NEW
102
};
×
103

104
Pipeline Pipeline::expansion() {
1✔
105
    Pipeline p("Expansion");
1✔
106

107
    p.register_pass<ExpansionPass>();
1✔
108

109
    return p;
1✔
110
};
1✔
111

112
} // namespace passes
113
} // 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