A question about doloop

2010-07-26 Thread Revital1 Eres

Hello,

Doloop optimization fails to be applied on the following kernel from
tescase sms-4.c with mainline (-r 162294) due to 'Possible infinite
iteration
case' message; taken from the loop2_doloop dump. (please see below).
With an older version of gcc (-r 146278) doloop succeeded to be applied
and I appreciate an explanation about the change of behavior.

Thanks,
Revital

The kernel:

  unsigned int i, n = size;
  int changed = 0;

  for (i = 0; i < n; i++)
{
  const int tmp = *ap++ | (*bp++ & *cp++);
  changed |= *dstp ^ tmp;
  *dstp++ = tmp;
}

The messages from loop2_doloop dump:

Doloop: Possible infinite iteration case.
Doloop: The loop is not suitable.


Loop 1 is simple:
  simple exit 4 -> 5
  infinite if: (expr_list:REG_DEP_TRUE (ne:SI (and:DI (minus:DI (plus:DI
(ashift:DI (reg:DI 200)
(const_int 2 [0x2]))
(reg/v/f:DI 194 [ ap ]))
(reg:DI 168 [ ivtmp.19 ]))
(const_int 3 [0x3]))
(const_int 0 [0]))
(nil))



Re: A question about doloop

2010-07-26 Thread Alexander Monakov


On Mon, 26 Jul 2010, Revital1 Eres wrote:

> 
> Hello,
> 
> Doloop optimization fails to be applied on the following kernel from
> tescase sms-4.c with mainline (-r 162294) due to 'Possible infinite
> iteration
> case' message; taken from the loop2_doloop dump. (please see below).
> With an older version of gcc (-r 146278) doloop succeeded to be applied
> and I appreciate an explanation about the change of behavior.

This may be due to changes in induction variable selection and the ability of
loop2_doloop to discover number of iterations for different variants of IV
selection (which is not trivial when 'i' variable is eliminated and loop
boundary is expressed with pointer comparison).  See PR32283 [1] audit trail
for an example of a related problem that was discussed before.

It is possible that something is missing in simplify-rtx.c so that 'infinite
if' condition cannot be simplified and proven to be always false.  Zdenek once
had to improve simplify-rtx.c for this reason, as the audit trail shows.

[1] http://gcc.gnu.org/PR32283

Hope that helps,
Alexander



Re: GFDL/GPL issues

2010-07-26 Thread Benjamin Kosnik

> What if we ask the FSF if we can dual license the constraints.md files
> under both the GPL and the GFDL?

Thanks for the update Mark.

I agree that we are likely to get more traction with a request to dual
license as opposed to re-license.

Although I confess to lingering doubts as to the big picture.

This implied documentation license algebra is quite weak and the
imagined documentation production toolchains and procedures quite
tortured. GPL indexes, but no GFDL direct linkages? Please. 

Not for the first time I find myself wishing the FSF spent more mental
effort on documentation for free software, at every level. 

-benjamin


Re: GFDL/GPL issues

2010-07-26 Thread Mark Mitchell
Benjamin Kosnik wrote:
>> What if we ask the FSF if we can dual license the constraints.md files
>> under both the GPL and the GFDL?

> I agree that we are likely to get more traction with a request to dual
> license as opposed to re-license.

Well, I've asked -- but RMS shot down that idea.

> Not for the first time I find myself wishing the FSF spent more mental
> effort on documentation for free software, at every level. 

I (and I speak here not for the FSF, the SC, CodeSourcery, or anybody
else) wish the FSF spent less time "improving" licenses and more time
focused on making FSF software attractive to end users.

I'm disappointed that a license "improvement" (changing GPL to GFDL on
manuals) has made it impossible to do something that we, as developers,
used to be able to do (when documentation was under the GPL we could
move things back and forth between code and documentation at will), and
which benefited users (by making it easier for us to generate better
documentation).

-- 
Mark Mitchell
CodeSourcery
m...@codesourcery.com
(650) 331-3385 x713


Re: GFDL/GPL issues

2010-07-26 Thread Robert Dewar

Mark Mitchell wrote:


I'm disappointed that a license "improvement" (changing GPL to GFDL on
manuals) has made it impossible to do something that we, as developers,
used to be able to do (when documentation was under the GPL we could
move things back and forth between code and documentation at will), and
which benefited users (by making it easier for us to generate better
documentation).


I agree that it is essential to be able to do this kind of movement
backwards and forwards.


Re: GFDL/GPL issues

2010-07-26 Thread Miles Bader
Mark Mitchell  writes:
>> I agree that we are likely to get more traction with a request to dual
>> license as opposed to re-license.
>
> Well, I've asked -- but RMS shot down that idea.

Did he give reasons, and/or indicate any other possible methods to use?

-Miles

-- 
`Suppose Korea goes to the World Cup final against Japan and wins,' Moon said.
`All the past could be forgiven.'   [NYT]