[Chapel Merge] Extend bounded coforall optimization to zippered l

Branch: refs/heads/main
Revision: aea5066
Author: ronawho
Log Message:

Merge pull request #18162 from ronawho/bounded-zippered-coforall-opt

Extend bounded coforall optimization to zippered loops

[reviewed by @bradcray and @e-kayrakli]

#5018 and #6419 optimized bounded coforalls over ranges/domains/arrays
by reducing the number of times we manipulate the endCount. However, it
only did this for direct loops, and not zippered ones. The lack of this
optimization led to regressions from #17354, which changed some direct
coforalls to zippered ones. That PR reduced the amount of communication,
but the overhead from not triggering the bounded coforall optimization
outweighed that, so it was partially reverted in #17531.

This extends the bounded coforall optimization to trigger for zippered
loops and reverts #17531.

See also https://github.com/Cray/chapel-private/issues/1836
Resolves https://github.com/Cray/chapel-private/issues/1850
Resolves https://github.com/Cray/chapel-private/issues/1925

Modified Files:
M compiler/AST/build.cpp

M modules/dists/BlockDist.chpl
M modules/internal/ChapelBase.chpl
M test/distributions/robust/arithmetic/performance/multilocale/alloc.block.good
M test/distributions/robust/arithmetic/performance/multilocale/alloc.block.na-none.good
M test/distributions/robust/arithmetic/performance/multilocale/alloc_all.block.good
M test/distributions/robust/arithmetic/performance/multilocale/alloc_all.block.na-none.good

Compare: https://github.com/chapel-lang/chapel/compare/f6f16f6bd78f...aea506611216