[PATCH] D72832: [NFC][LoopUtils] Added regression test for getEstimatedTripCount.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 16:13:13 PST 2020


fhahn added a comment.

In D72832#1830747 <https://reviews.llvm.org/D72832#1830747>, @ebrevnov wrote:

> In D72832#1826038 <https://reviews.llvm.org/D72832#1826038>, @fhahn wrote:
>
> > Could you describe why the changes to run the tests via the pass managers is required? Wouldn't it be sufficient to use initialize the required analysis for the function and use that with getLoopEstimatedTripCount?
>
>
> They are not required. The thing is LoopUtilsTest.cpp didn't exist when I first developed my test. Later during one of the rebases I discovered that somebody else introduced a test with the same name. It didn't look right to me to do loop traversal in one test in two different ways. My personal preference was to use pass manager and I streamlined the code this way. Do you see any problems with that?


IMO pulling in the pass manager to run the tests adds quite a bit of additional complexity to the tests, without much benefit, unless I am missing something. I think it would be preferable to just instantiate the required classes directly. Also, I think overall there would be less code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72832





More information about the llvm-commits mailing list