[PATCH] D83316: [OpenMPOpt][WIP] Structure for unittests

Hamilton Tobon-Mosquera via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 11:15:43 PDT 2020


hamax97 added a comment.

In D83316#2184765 <https://reviews.llvm.org/D83316#2184765>, @JonChesterfield wrote:

> I'm not totally sure about this. There's a lot of test setup relative to the test case itself, and I can't work out by reading the test itself what it's checking. What are all the mock classes for?
>
> I'm wondering if we would be better off refactoring the code it intends to test so that it needs less setup.

Regarding the mock classes. I forgot to remove `MockFunctionPass` and `MockModulePass`. But `MockSCCPass` is used for later using `EXPECT_CALL` inside the unit test itself.

Regarding refactoring the code, I think it can be done. We would have to traverse manually the function until reaching the runtime call needed. But, don't you think that all this setup might be useful for other OpenMP optimizations?, or perhaps we should wait until we have them, idk.


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

https://reviews.llvm.org/D83316



More information about the llvm-commits mailing list