This is the mail archive of the gcc-help@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]

Re : Re : [gimple] temporary variable


Hello,
Thank you again for your answer. 
You are right, the aim of the gimplification is to simplify the generic from and it introduces temporary variables to do that.

I just thought that we are also interested in producing more compact GIMPLE (just like the idea to move from gimple tree structure to tuples : the aim is to produce more compat gimple).

I am not sure that the 2005 paper is out of date because it proposes gimplification improvments that the?recent ?gcc version?(I am using the gcc 4.4.2) still not take it into account. Perhaps because?efforts are concentrated now in GIMPLE tuples and not?in??enhancing old tree structures :)

Thank you again

Asma


----- Message d'origine ----
De : Ian Lance Taylor <iant@google.com>
À : charfi asma <charfiasma@yahoo.fr>
Cc : gcc-help@gcc.gnu.org
Envoyé le : Mer 28 avril 2010, 2 h 29 min 44 s
Objet?: Re: Re : [gimple] temporary variable

charfi asma <charfiasma@yahoo.fr> writes:

> I would like to understand the gimplification step in GCC and I heard about unstructured and structured gimple produced from code (gcc summit 2005, gimplification improvment)
> for example, to improve gimplification, Gimple code generated from.
>
> if (a++ +b != 0) return 0; else return 1; 
> should be :
> D.1715 = a + b;
> a = a + 1;
> if (D.1715 != 0) goto <D.1716>; else goto <D.1717>;
>
> and this is not what gcc 4.4 produce (with interval.0...)
>
> I do not think that no body pays attentions to details generated in gimple. 
> I think that each introduced variable should be justified.

I'm fairly sure that the 2005 paper is out of date with respect to
current gcc.

I suppose I would recommend that you examine the gcc source code to
understand where these variables are coming from.? That will give you
an argument for whether the variable is justified or not.

Don't lose sight of the fact that GIMPLE generation should be fast
rather than optimal.? The compiler already has to run a number of
optimization passes which are completely able to remove unnecessary
variables introduced during gimplification.? If it takes time during
gimplification to decide whether or not to introduce a variable, then
it's better to introduce the variable and let the subsequent pass,
which we know we are going to run anyway, clean it up.? Of course, if
the variable can be omitted during gimplification without taking any
time, then that is better still.

Ian





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