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

daisytuner / sdfglib / 20764569418

06 Jan 2026 10:50PM UTC coverage: 62.168% (+21.4%) from 40.764%
20764569418

push

github

web-flow
Merge pull request #433 from daisytuner/clang-coverage

updates clang coverage flags

14988 of 24109 relevant lines covered (62.17%)

88.57 hits per line

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

67.74
/src/passes/dataflow/trivial_reference_conversion.cpp
1
#include "sdfg/passes/dataflow/trivial_reference_conversion.h"
2

3
#include <unordered_set>
4

5
#include "sdfg/analysis/analysis.h"
6
#include "sdfg/analysis/users.h"
7
#include "sdfg/builder/structured_sdfg_builder.h"
8
#include "sdfg/data_flow/access_node.h"
9
#include "sdfg/data_flow/data_flow_graph.h"
10
#include "sdfg/data_flow/memlet.h"
11
#include "sdfg/data_flow/tasklet.h"
12
#include "sdfg/element.h"
13
#include "sdfg/structured_control_flow/block.h"
14
#include "sdfg/structured_control_flow/control_flow_node.h"
15
#include "sdfg/structured_control_flow/if_else.h"
16
#include "sdfg/structured_control_flow/sequence.h"
17
#include "sdfg/structured_control_flow/structured_loop.h"
18
#include "sdfg/types/type.h"
19
#include "sdfg/visitor/structured_sdfg_visitor.h"
20

21
namespace sdfg {
22
namespace passes {
23

24

25
TrivialReferenceConversion::
26
    TrivialReferenceConversion(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager)
27
    : visitor::NonStoppingStructuredSDFGVisitor(builder, analysis_manager) {};
2✔
28

29
bool TrivialReferenceConversion::accept(structured_control_flow::Block& block) {
3✔
30
    bool applied = false;
3✔
31
    auto& dfg = block.dataflow();
3✔
32

33
    // Narrow type of reference memlets to int8
34
    for (auto& edge : dfg.edges()) {
3✔
35
        // Find memlets that are references
36
        if (edge.type() != data_flow::MemletType::Reference) {
3✔
37
            continue;
×
38
        }
×
39
        if (edge.subset().size() != 1) {
3✔
40
            continue;
×
41
        }
×
42
        if (!symbolic::eq(edge.subset().at(0), symbolic::zero())) {
3✔
43
            continue;
1✔
44
        }
1✔
45
        auto& base_type = edge.base_type();
2✔
46
        if (base_type.type_id() != types::TypeID::Pointer) {
2✔
47
            continue;
×
48
        }
×
49
        auto& base_type_ptr = static_cast<const types::Pointer&>(base_type);
2✔
50
        if (!base_type_ptr.has_pointee_type()) {
2✔
51
            continue;
×
52
        }
×
53
        auto& pointee_type = base_type_ptr.pointee_type();
2✔
54
        if (pointee_type.type_id() != types::TypeID::Pointer) {
2✔
55
            continue;
×
56
        }
×
57
        edge.set_base_type(types::Pointer(types::Scalar(types::PrimitiveType::Int8)));
2✔
58
        applied = true;
2✔
59
    }
2✔
60

61
    return applied;
3✔
62
}
3✔
63

64
} // namespace passes
65
} // 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