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

daisytuner / docc / 28158800507

25 Jun 2026 08:57AM UTC coverage: 61.644% (+0.06%) from 61.582%
28158800507

push

github

web-flow
MapFusionByDomain (#771)

 + New Map fusion caches data about iteration domain and map candidates
 + only matches up iteration domain exactly, per loop level.
 + Can support fusing non-leaf stacks of loops (stack ends where the shallower stack stops being perfectly nested & parallel)
 + new Element::replace for bulk replacements
 + New PatternMatcher visitor supports descending into replaced or modified nodes to allow for single-pass nested loop fusings
 + LoopAnalysis can now be kept up-to-date with changes done by Map-fusion
 + unit tests for the updating of LoopAnalysis
 * updated LoopAnalysis to be easier to keep up-to-date with changes. LoopTree is no longer ordered, if you want to iterate in pre-order, use the specific method for that
 + convenience StructuredSDFGBuilder.remove_from_parent()
 + RedundantLoadElim pass to skip reading from memory locations that have just been written (same block). Fusing no longer needs to do this
     RedundantLoadElimination does a simple check for other writes to the same structure. Can skip writes if redundant or not modify, if their are writes to different indices
* Updated verifiers to match new fusion
~ moved verifier checks behind correctness checks in npbench harness. Its more critical if we do not even get the expected results
* Added MapFusionByDomain also to loop-norm stage (currently inactive, causes more kernels that currently cannot be safely offloaded to CUDA.
---------

Co-authored-by: Lukas Truemper <lukas.truemper@outlook.de>

771 of 1186 new or added lines in 55 files covered. (65.01%)

6 existing lines in 6 files now uncovered.

38302 of 62134 relevant lines covered (61.64%)

987.24 hits per line

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

31.25
/sdfg/src/structured_control_flow/return.cpp
1
#include "sdfg/structured_control_flow/return.h"
2

3
#include "sdfg/function.h"
4
#include "sdfg/types/type.h"
5

6
namespace sdfg {
7
namespace structured_control_flow {
8

9
Return::Return(size_t element_id, const DebugInfo& debug_info, ControlFlowNode* parent, const std::string& data)
10
    : ControlFlowNode(element_id, debug_info, parent), data_(data), type_(nullptr) {}
56✔
11

12
Return::Return(
13
    size_t element_id,
14
    const DebugInfo& debug_info,
15
    ControlFlowNode* parent,
16
    const std::string& data,
17
    const types::IType& type
18
)
19
    : ControlFlowNode(element_id, debug_info, parent), data_(data), type_(type.clone()) {}
×
20

21

22
const std::string& Return::data() const { return data_; }
116✔
23

24
const types::IType& Return::type() const { return *type_; }
×
25

26
bool Return::is_data() const { return type_ == nullptr; }
99✔
27

28
bool Return::is_constant() const { return type_ != nullptr; }
4✔
29

30
void Return::validate(const Function& function) const {
57✔
31
    if (is_data()) {
57✔
32
        if (data_ != "" && !function.exists(data_)) {
57✔
33
            throw InvalidSDFGException("Return node with data '" + data_ + "' does not correspond to any container");
×
34
        }
×
35
        if (type_ != nullptr) {
57✔
36
            throw InvalidSDFGException("Return node with data cannot have a type");
×
37
        }
×
38
    } else if (is_constant()) {
57✔
39
        if (function.exists(data_)) {
×
40
            throw InvalidSDFGException(
×
41
                "Return node with constant data '" + data_ + "' cannot correspond to any container"
×
42
            );
×
43
        }
×
44
        if (type_ == nullptr) {
×
45
            throw InvalidSDFGException("Return node with constant data must have a type");
×
46
        }
×
47
    } else {
×
48
        throw InvalidSDFGException("Return node must be either data or constant");
×
49
    }
×
50
};
57✔
51

52
void Return::replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) {
×
53
    if (is_data() && data_ == old_expression->__str__()) {
×
54
        data_ = new_expression->__str__();
×
55
    }
×
NEW
56
}
×
57

58
} // namespace structured_control_flow
59
} // 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