Replace the OpenMP Runtime Library functions used in CGOpenMPRuntimeGPU for OpenMP device code generation with ones in OMPKinds.def and use OMPIRBuilder for generating runtime calls. This allows us to consolidate more OpenMP code generation into the OMPIRBuilder.
This currently fails some Clang tests because of an error with how size_t is handled by Clang versus OMPKinds.def. The compiler will crash when generating code for a 32 bit device on a 64 bit host because Clang uses the size_t from the host while OMPKinds.def uses the size_t from the device.
|38 ↗||(On Diff #294744)|
When it's generating __kmpc_shuffle_intxx around line 2480 it gets an instance of CGOpenMPRuntimeGPU indirectly which meant I had to make it public so it could use it. I could probably rewrite all the functions to be inside the class but I'm not sure if that'll break anything. So I just made it public for now.
Reusing OMPBuilder from CGOpenMPRuntime. Altered the failing test case. This case failed when compiling for a 32 bit device on a 64 bit host. This case should be considered an error because the host and device have incompatible pointer sizes and shouldn't be able to communicate. The test has been changed to only compile for hosts and devices that have compatible pointer sizes.
Removed now unused function for generating convergent runtime functions. Updated Clang to print an error message if the user attempts to specify incompatible architectures due to a difference in pointer sizes.