On Wed, Apr 14, 2010 at 1:44 PM, Martin Jambor <mjam...@suse.cz> 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 <rguent...@suse.de> 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 into SSA form.
>> It's very simple to do that manually (at least if no PHIs are
>> involved), so better do that.
>>
>
> The problem of using create_tmp_var directly is that the following
> pattern is now bound to creep up at quite many places:
>
>      tmp = create_tmp_var (TREE_TYPE (adj->base), "blah");
>      if (TREE_CODE (TREE_TYPE (tmp)) == COMPLEX_TYPE
>          || TREE_CODE (TREE_TYPE (tmp)) == VECTOR_TYPE)
>        DECL_GIMPLE_REG_P (tmp) = 1;
>
> Perhaps we should have something like create_gimple_reg_tmp_var that
> would do this?  If so, I'll be happy to add it.

Yes.  I suggest create_tmp_reg as a name for that (simply add
a wrapper around create_tmp_var).

Richard.

> Martin
>

Reply via email to