This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp4/cilkplus] special case NE_EXPR for omp4 loops


Hi Jakub.

In contrast to OMP4+, Cilk Plus allows a "!=" in the condition to a simd for loop (we are guaranteed no unsigned wrap around).

I'm not totally happy with the cleanliness of this patch, but the alternative seems a lot more convoluted. Type checking before hand, should guarantee that we don't get a NE_EXPR incorrectly (both for Cilk Plus and OMP). I guess we could add some sort of annotation to the OMP_SIMD that lets us know we were originally a Cilk Plus construct, but that hardly seems worth the effort for handling this case. Although, there could be more things to come ??, though none come to mind right now.

Anyway, this patch fixes the last remaining testsuite failure for both C/C++: c-c++-common/cilk-plus/PS/for5.c.

If you hate this too much, I can work on an alternative approach, otherwise I'll queue it up with my patchset sitting on top of your gomp4 branch (my aldyh/cilk-in-gomp branch).

Thoughts?

Aldy

Attachment: curr
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]