Re: Copy assignments for non scalar types

2010-04-14 Thread Richard Guenther
On Wed, Apr 14, 2010 at 1:44 PM, Martin Jambor wrote: > Hi, > > On Wed, Apr 14, 2010 at 01:31:05PM +0200, Richard Guenther wrote: >> On Wed, 14 Apr 2010, Diego Novillo wrote: >> >> > On Wed, Apr 14, 2010 at 04:40, Richard Guenther wrote: >> > >> > > No.  make_rename_temp should go away.  Please.

Re: Copy assignments for non scalar types

2010-04-14 Thread Diego Novillo
On Wed, Apr 14, 2010 at 07:31, Richard Guenther wrote: > It asks the SSA renamer to put your new variables into SSA form. > It's very simple to do that manually (at least if no PHIs are > involved), so better do that. But then we'd have lots of duplicate code fragments all doing the same thing.

Re: Copy assignments for non scalar types

2010-04-14 Thread Martin Jambor
Hi, On Wed, Apr 14, 2010 at 01:31:05PM +0200, Richard Guenther wrote: > On Wed, 14 Apr 2010, Diego Novillo wrote: > > > On Wed, Apr 14, 2010 at 04:40, Richard Guenther wrote: > > > > > No. make_rename_temp should go away. Please. > > > > I don't disagree, in principle (less code is always go

Re: Copy assignments for non scalar types

2010-04-14 Thread Richard Guenther
On Wed, 14 Apr 2010, Diego Novillo wrote: > On Wed, Apr 14, 2010 at 04:40, Richard Guenther wrote: > > > No.  make_rename_temp should go away.  Please. > > I don't disagree, in principle (less code is always good). What is > wrong with it? It asks the SSA renamer to put your new variables int

Re: Copy assignments for non scalar types

2010-04-14 Thread Diego Novillo
On Wed, Apr 14, 2010 at 04:40, Richard Guenther wrote: > No.  make_rename_temp should go away.  Please. I don't disagree, in principle (less code is always good). What is wrong with it? Diego.

Re: Copy assignments for non scalar types

2010-04-14 Thread Richard Guenther
On Tue, 13 Apr 2010, Sebastian Pop wrote: > On Tue, Apr 13, 2010 at 13:14, Sebastian Pop wrote: > > Hi, > > > > While working on the tree-if-conv.c, I realized that the copy > > of the contents of a non scalar variable are not correctly done. > > The copy assignment triggers this error: > > > > e

Re: Copy assignments for non scalar types

2010-04-13 Thread Eric Botcazou
> if (!is_gimple_reg (var)) > > you shouldn't create SSA name and change the lhs of the stmt. You might also not be allowed to make a copy in the first place but only to take a reference, see gimplify_cond_expr. -- Eric Botcazou

Re: Copy assignments for non scalar types

2010-04-13 Thread Sebastian Pop
On Tue, Apr 13, 2010 at 14:42, Jakub Jelinek wrote: > if (!is_gimple_reg (var)) > > you shouldn't create SSA name and change the lhs of the stmt. > This worked well. Thanks Jakub! Sebastian

Re: Copy assignments for non scalar types

2010-04-13 Thread Sebastian Pop
On Tue, Apr 13, 2010 at 13:14, Sebastian Pop wrote: > Hi, > > While working on the tree-if-conv.c, I realized that the copy > of the contents of a non scalar variable are not correctly done. > The copy assignment triggers this error: > > error: virtual SSA name for non-VOP decl > while verifying S

Re: Copy assignments for non scalar types

2010-04-13 Thread Jakub Jelinek
On Tue, Apr 13, 2010 at 01:14:11PM -0500, Sebastian Pop wrote: > /* Create a new temp variable of type TYPE. Add GIMPLE_ASSIGN to assign EXP >to the new variable. */ > > static gimple > ifc_temp_var (tree type, tree exp) > { > const char *name = "_ifc_"; > tree var, new_name; > gimple

Copy assignments for non scalar types

2010-04-13 Thread Sebastian Pop
Hi, While working on the tree-if-conv.c, I realized that the copy of the contents of a non scalar variable are not correctly done. The copy assignment triggers this error: error: virtual SSA name for non-VOP decl while verifying SSA_NAME _ifc_.2005_46 in statement # .MEM_394 = VDEF <.MEM_475>