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

Commit 3220819

Browse files
author
Sven Verdoolaege
committed
isSupportedReduction: simplify code
1 parent 42cf0e7 commit 3220819

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tc/core/polyhedral/reduction_matcher.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ namespace {
3939
bool isSupportedReduction(Halide::Internal::Stmt stmt) {
4040
auto provide = stmt.as<Halide::Internal::Provide>();
4141
auto call = provide->values[0].as<Halide::Internal::Call>();
42-
if (call && call->args.size() > 0 &&
43-
call->args[0].as<Halide::Internal::Add>()) {
44-
return true;
45-
}
46-
return false;
42+
return call && call->args.size() > 0 &&
43+
call->args[0].as<Halide::Internal::Add>();
4744
}
4845

4946
// TODO: the function currently available in Scop only works _after_ inserting

0 commit comments

Comments
 (0)