Hi, I'm sorry it took me more than a month to come up with another round of patches aiming at merging the HSA branch into the trunk. Keeping up-to date with the latest changes in the OpenMP 4.5 area was strenuous and we have discovered and fixed a few bugs as I intensified my testing efforts.
While those are the main areas where this patch set differs from the previous one, I have of course addressed the feedback I got the last time, including implementing device-specific OpenMP target arguments, moving kernel grid size from gimple class fields to new artificial clauses and disabling the vectorizer for HSA functions using DECL_FUNCTION_SPECIFIC_OPTIMIZATION rather than extra code in respective pass gates. Because I have not been able to come up with any solution to failing libgomp/testsuite/libgomp.c++/target-2.C, I have disabled use of dynamic parallelism in this merge (I keep it on the branch) and therefore entirely rely on the gridification process to run loops on the accelerator, because gridified constructs do not have this issue (passing private symbols by reference). HSA tests are still missing, I would need some guidance as to how to best implement them (specially to test gridification which of course does not happen for other accelerators). There are no failing testcases if HSA is not configured. If it is, there are some, all of which fall into one the following categories: 1) HSA cannot compile a function for one reason or another (most common cause is inability of HSA to take an address of a function or make an indirect call) and gives a warning, which is regarded as an "excess error" by dejagnu. 2) When HSA is not emitted for a function, libgomp runs a host fallback instead of it. When the test queries omp_is_initial_device and asserts it returns false, the test fails. 3) There are still a few failing OpenACC tests, but those just should not be run. Of course, the patch set bootstraps fine on x86_64-linux with or without configured HSA. Any feedback is welcome. Thanks, Martin