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

daisytuner / sdfglib / 16439608634

22 Jul 2025 08:57AM UTC coverage: 65.982% (+0.9%) from 65.094%
16439608634

Pull #153

github

web-flow
Merge 373570200 into abe57c083
Pull Request #153: Restricts memlets to contiguous memory

213 of 317 new or added lines in 30 files covered. (67.19%)

66 existing lines in 7 files now uncovered.

8321 of 12611 relevant lines covered (65.98%)

128.51 hits per line

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

8.82
/src/passes/dataflow/dead_reference_elimination.cpp
1
#include "sdfg/passes/dataflow/dead_reference_elimination.h"
2

3
#include "sdfg/analysis/users.h"
4

5
namespace sdfg {
6
namespace passes {
7

8
DeadReferenceElimination::DeadReferenceElimination()
1✔
9
    : Pass() {
1✔
10

11
      };
1✔
12

13
std::string DeadReferenceElimination::name() { return "DeadReferenceElimination"; };
×
14

15
bool DeadReferenceElimination::
NEW
16
    run_pass(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) {
×
UNCOV
17
    bool applied = false;
×
18

19
    auto& sdfg = builder.subject();
×
20
    auto& users = analysis_manager.get<analysis::Users>();
×
21

22
    std::list<std::string> to_delete;
×
23
    for (auto& name : sdfg.containers()) {
×
24
        if (!sdfg.is_transient(name)) {
×
25
            continue;
×
26
        }
27
        if (!dynamic_cast<const types::Pointer*>(&sdfg.type(name))) {
×
28
            continue;
×
29
        }
30
        // Requirement: Pointer is only assigned
31
        auto reads = users.reads(name);
×
32
        auto writes = users.writes(name);
×
33
        if (reads.size() > 0 || writes.size() > 0) {
×
34
            continue;
×
35
        }
36
        auto views = users.views(name);
×
37
        auto moves = users.moves(name);
×
38
        if (views.size() > 0) {
×
39
            continue;
×
40
        }
41

42
        for (auto& move : moves) {
×
43
            auto access_node = dynamic_cast<data_flow::AccessNode*>(move->element());
×
44
            auto& graph = dynamic_cast<data_flow::DataFlowGraph&>(access_node->get_parent());
×
45
            auto& block = dynamic_cast<structured_control_flow::Block&>(*graph.get_parent());
×
46
            builder.clear_node(block, *access_node);
×
47
            applied = true;
×
48
        }
49

50
        to_delete.push_back(name);
×
51
    }
×
52
    for (auto& name : to_delete) {
×
53
        builder.remove_container(name);
×
54
    }
55

56
    return applied;
×
57
};
×
58

59
} // namespace passes
60
} // 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