[PATCH] D107395: [Polly][test] Test difference between isl::stat:ok() and isl::stat::error().

1 view
Skip to first unread message

Michael Kruse via Phabricator

unread,
Aug 3, 2021, 4:13:28 PM8/3/21
to pat...@autistici.org, siddu...@gmail.com, poll...@googlegroups.com, llvm-c...@lists.llvm.org, bhuvanend...@amd.com, yanli...@intel.com, lege...@outlook.com, micha...@web.de, doug...@gmail.com, jatin....@gmail.com, n...@google.com, wic...@vitalitystudios.com, michae...@gmail.com, phabr...@grosser.es
Meinersbur created this revision.
Meinersbur added a reviewer: patacca.
Meinersbur added a project: Polly.
Herald added a reviewer: bollu.
Meinersbur requested review of this revision.
Herald added a project: LLVM.

The foreach callback wrappers tests check the return values of isl::stat:ok() and isl::stat::error() separately. However, due to the the container they are iterating over containing just one element, they are actually not testing the difference between them.

This patch changes to set to be iterated over to contain 2 element to make returning sl::stat:ok (continue iterating the next element) and isl::stat::error (break after current element) have different effects other than the return value of the foreach itself.


Repository:
rG LLVM Github Monorepo

https://reviews.llvm.org/D107395

Files:
polly/unittests/Isl/IslTest.cpp

D107395.363853.patch

Riccardo Mori via Phabricator

unread,
Aug 5, 2021, 11:00:15 AM8/5/21
to ll...@meinersbur.de, pat...@autistici.org, siddu...@gmail.com, poll...@googlegroups.com, llvm-c...@lists.llvm.org, bhuvanend...@amd.com, yanli...@intel.com, lege...@outlook.com, micha...@web.de, doug...@gmail.com, jatin....@gmail.com, n...@google.com, wic...@vitalitystudios.com, michae...@gmail.com, phabr...@grosser.es
patacca accepted this revision.
patacca added a comment.
This revision is now accepted and ready to land.

LGTM.
It is also a lot easier to understand.


Repository:
rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107395/new/

https://reviews.llvm.org/D107395

Michael Kruse via Phabricator

unread,
Aug 5, 2021, 3:49:50 PM8/5/21
to pat...@autistici.org, siddu...@gmail.com, poll...@googlegroups.com, llvm-c...@lists.llvm.org, bhuvanend...@amd.com, yanli...@intel.com, lege...@outlook.com, micha...@web.de, doug...@gmail.com, jatin....@gmail.com, n...@google.com, wic...@vitalitystudios.com, michae...@gmail.com, phabr...@grosser.es
This revision was automatically updated to reflect the committed changes.
Closed by commit rG50eaa82cdbc7: [Polly][test] Test difference between isl::stat:ok() and isl::stat::error(). (authored by Meinersbur).

Repository:
rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107395/new/

https://reviews.llvm.org/D107395

Files:
polly/unittests/Isl/IslTest.cpp

D107395.364585.patch
Reply all
Reply to author
Forward
0 new messages