Basic structure for adding new unittests to the OpenMPOpt optimizations.
Wow, this required more machinery than I expected.. thanks!
Should we merge this with the MemoryTransfer logic so we can test it?
Don't compare the names. Go through the module and locate the value you want and compare it against the llvm::Value.
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.