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

daisytuner / sdfglib / 15044057891

15 May 2025 11:42AM UTC coverage: 59.37% (+1.8%) from 57.525%
15044057891

push

github

web-flow
Merge pull request #14 from daisytuner/sanitizers

enables sanitizer on unit tests

63 of 67 new or added lines in 47 files covered. (94.03%)

570 existing lines in 62 files now uncovered.

7356 of 12390 relevant lines covered (59.37%)

505.93 hits per line

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

93.33
/src/passes/schedule/allocation_inference.cpp
1
#include "sdfg/passes/schedule/allocation_inference.h"
2

3
namespace sdfg {
4
namespace passes {
5

6
AllocationInference::AllocationInference()
5✔
7
    : Pass(){
5✔
8

9
      };
5✔
10

11
std::string AllocationInference::name() { return "AllocationInference"; };
×
12

13
bool AllocationInference::run_pass(Schedule& schedule) {
5✔
14
    bool applied = false;
5✔
15

16
    auto& analysis_manager = schedule.analysis_manager();
5✔
17
    auto& sdfg = schedule.sdfg();
5✔
18

19
    auto& users = analysis_manager.get<analysis::Users>();
5✔
20
    for (auto& container : sdfg.containers()) {
15✔
21
        if (!sdfg.is_transient(container)) {
10✔
22
            continue;
5✔
23
        }
24
        auto& type = sdfg.type(container);
5✔
25
        if (!dynamic_cast<const types::Pointer*>(&type)) {
5✔
26
            schedule.allocation_type(container, AllocationType::ALLOCATE);
3✔
27
            applied = true;
3✔
28
            continue;
3✔
29
        }
30

31
        bool is_moved_before_access = true;
2✔
32
        auto sources = users.sources(container);
2✔
33
        for (auto& source : sources) {
3✔
34
            if (source->use() != analysis::Use::MOVE) {
2✔
35
                is_moved_before_access = false;
1✔
36
                break;
1✔
37
            }
38
        }
39

40
        if (!is_moved_before_access) {
2✔
41
            schedule.allocation_type(container, AllocationType::ALLOCATE);
1✔
42
            applied = true;
1✔
43
        }
1✔
44
    }
2✔
45

46
    return applied;
5✔
UNCOV
47
};
×
48

49
}  // namespace passes
50
}  // 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