This is the mail archive of the gcc@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: [lno] [RFC] if-conversion and auto vectorizer



On Mar 14, 2004, at 2:22 PM, Andrew Pinski wrote:



On Mar 14, 2004, at 03:07, Dorit Naishlos wrote:


I will also be doing the following soon (after MIN/MAX becomes gimple
which has already be discussed and approved):

I seem to have missed the MIN/MAX discussion thread. Do you have a link to
that, or was it off the mailing list? just curious when is it planned to
add the MIN/MAX tree codes to gimple and who is responsible for that?

It was discussed off list (on IRC). Really MIN/MAX is already gimple, just that it gets
lowered when gimplifing happens. Also right now DOM does not understand MIN/MAX.
The current plan is remove the lowering when the tree-ssa gets merged into the mainline.
I think Daniel Berlin said he would be the one to remove the lowering as the linear loop
transformation generates better code with MIN/MAX instead of different basic blocks.
It's not better code so much as much less complex code. This is in the case of integer min/max.
Otherwise, performing a min/max requires 1 cond_expr, two new basic blocks, two new labels, and two new gotos, per MAX/MIN operation.
In the case of floating point min/max, RTH pointed out that it is very hard to put the lowered form back together into MAX/MIN.


I think he also has a patch to teach DOM about it too but I am not too sure.


There isn't really much to teach DOM about here.


Previously, DOM saw

if (a < b)
	c = a;
else
	c = b;

It knew that in each arm, a was either < or > b, respectively.

With
c = MAX (a, b);

we know nothing about each arm (because they are implicit), but it doesn't actually matter, because you couldn't have done anything with the info anyway here.

So i'm not sure what you want me to teach DOM.


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