18065, "e-kayrakli", "Can we retire order independence pragmas?", "2021-07-13T23:31:16Z"
With the addition of
foreach loop, we removed most of the uses of
[not] order independent yielding loops. As Brad asked here, I looked into the remaining cases of the uses of these pragmas.
- I think we can remove most of them (I am testing this patch)
- Most were probably added after Michael has started his work, and I cherrypicked his changes to the modules from his branch, so there are some that seemingly slipped by.
- There's one on a while-based iterator, but I think that's the wrong use of the pragma (?)
- We need to keep those that are on range iterators. They use
__primitive("C for loop")to implement very basic range iterators. And I am not sure if we can remove those. Arguably, we can retire the pragma and add a
order-independent C for looppragma, but I don't know if that's progress. We'll be replacing something ugly and not user-facing with something else that's ugly and not user-facing.
Should there be a way for users to vectorize while/do-while based iterators? If so, we need to find a user-facing way for that before we can retire these pragmas. Vectorization considerations · Issue #7761 · chapel-lang/chapel · GitHub has some design ideas for order-independent
for loops. Most of it is moot with the
foreach loops, but can be interesting to think about for order independence of non-for loops. But I think the only thing that's reasonably applicable to
do-while loops is the annotation-based approach.