Hi, we have had a few last-minute issues, so I apologize this is happening a bit late, but I would like to start the process or merging the HSA branch to GCC trunk. Changes to different parts of the compiler and libgomp are posted as individual emails in this thread. No two patches touch any single file and almost all of them need to be applied together at once, I have only split the one big patch up to ease review.
Individual changes are described in slightly more detail in their respective messages. If you are interested in how the HSAIL generation works in general, I encourage you to have a look at my Cauldron slides or presentation, only very few things have changed as far as the general principles are concerned. Let me just quickly stress here that we do acceleration within a single compiler, as opposed to LTO-ways of all the other accelerator teams. We have bootsrapped and tested the patched GCC with and without HSA enabled on x86_64-linux and found only a single issue (see below) a few new HSA warnings when HSA was enabled. We have also run the full C, C++ and Fortran testsuite on a computer that actually has a Carrizo HSA APU and the result was the same. The single issue is that libgomp.oacc-c/../libgomp.oacc-c-c++-common/* tests get run using our HSA plugin, which however cannot do OpenACC. I believe it should be something very easy to fix and I did not want to hold off the submission and review because of it. I also acknowledge that we should add HSA-specific tests to the GCC testsuite but we are only now looking at how to do that and will welcome any guidance in this regard. I acknowledge that the submission comes quite late and that the class of OpenMP loops we can handle well is small, but nevertheless I would like to ask for review and eventual acceptance to trunk and GCC 6. I'll be grateful for any review, comments or questions, Martin