This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [omp4]
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 4 Nov 2013 16:44:35 +0100
- Subject: Re: [omp4]
- Authentication-results: sourceware.org; auth=none
- References: <5277BAF0 dot 6050506 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Nov 04, 2013 at 08:19:12AM -0700, Aldy Hernandez wrote:
> Hi.
>
> While looking over some of your testcases I noticed that array
> subscripts are not being properly adjusted:
>
> foo(int i) {
> array[i] = ....
> }
>
> The `i' should use the simd array magic instead of ICEing :).
>
> Is the attached patch OK for the branch?
I guess short time yes, but I wonder if it wouldn't be better to use
walk_gimple_op and do all changes in the callback. Instead of passing
adjustments pass around a struct containing the adjustments, current stmt
and the modified flag. You can use the val_only and is_lhs to determine
what you need to do (probably need to reset those two for the subtrees
to val_only = true, is_lhs = false and not walk subtrees of types) and you
could (if not val_only) immediately gimplify it properly (insert temporary
SSA_NAME setter before resp. store after depending on is_lhs).
Then you could avoid the regimplification.
Jakub