PSyclone
PSyclone copied to clipboard
A routine with ACC routine should not contain an allocate
Asif has reported that he can create invalid code by combining the HoistLocalArrayTrans with the ACCRoutineTrans because the former adds an allocate to the routine. Since the routine is being compiled for the GPU, this is not correct. We could possibly resolve this by changing the allocate into an ACC create but that's not going to give performant code so we probably just want to forbid it.
This check needs to be done at code-generation time and will be made much cleaner once the PSyIR has support for allocate (#1907).