Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 989dca1

Browse files
Sven VerdoolaegeTheodoros Theodoridis
authored andcommitted
MappedScop::findBestSync: avoid redundant computations
isl does not currently perform any operations lazily, so a potentially large product map would get created even if only a very small part of it will actually get used. Intersect domain and range directly instead.
1 parent fb4e5e4 commit 989dca1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tc/core/polyhedral/cuda/mapped_scop.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,9 @@ Scop::SyncLevel MappedScop::findBestSync(
550550
auto activePoints2 = activeDomainPointsBelow(stRoot, st2);
551551

552552
// The dependences between the two schedule trees
553-
auto dependences =
554-
isl::union_map::from_domain_and_range(activePoints1, activePoints2);
555-
dependences = dependences.intersect(scop_->dependences);
553+
auto dependences = scop_->dependences;
554+
dependences = dependences.intersect_domain(activePoints1);
555+
dependences = dependences.intersect_range(activePoints2);
556556
if (dependences.is_empty()) {
557557
return Scop::SyncLevel::None;
558558
}

0 commit comments

Comments
 (0)