[Chapel Merge] A function to find blocks suitable to execute on G

Branch: refs/heads/main
Revision: 84fdb35
Author: daviditen
Log Message:

Merge pull request #18224 from daviditen/gpuStreamCheck

A function to find blocks suitable to execute on GPU

[reviewed by @e-kayrakli]

Add a function that returns true if the only calls in a block are
FAST_AND_LOCAL primitives according to the analysis implemented in
the optimizeOnClauses pass. It can also return true for blocks
containing calls to functions that only use FAST_AND_LOCAL primitives
recursively, but this is currently disabled with the allowFnCalls=false
argument.

Call this function in the GPU outliner code in addition to the check it was
already doing. We can remove the other check in another step.

Signed-off-by: David Iten daviditen@users.noreply.github.com

Modified Files:
M compiler/include/ForallStmt.h

M compiler/include/primitive.h
M compiler/optimizations/deadCodeElimination.cpp
M compiler/optimizations/optimizeOnClauses.cpp
M compiler/passes/checkResolved.cpp

Compare: https://github.com/chapel-lang/chapel/compare/252f9f688bcc...84fdb359cda7