gcc-4.9-20140330 is now available

2014-03-30 Thread gccadmin
Snapshot gcc-4.9-20140330 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/4.9-20140330/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 4.9 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision 208948

You'll find:

 gcc-4.9-20140330.tar.bz2 Complete GCC

  MD5=8078eed622493ecf0068e43682b722be
  SHA1=ebe424891d2eb96b346b14fde25d99c68d6574c7

Diffs from 4.9-20140323 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-4.9
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


Re: Request for discussion: Rewrite of inline assembler docs

2014-03-30 Thread dw
So, after looking over this discussion, I have updated the text. This 
time no undefined terms, while still conveying all the points I had in mind:


The "memory" clobber tells the compiler that the assembly code performs 
memory reads or writes to items other than those listed in the input and 
output operands (for example accessing the memory pointed to by one of 
the input parameters).  To ensure memory contains correct values, GCC 
may need to flush specific register values to memory before executing 
the asm. Further, the compiler will not assume that any values read from 
memory before the @code{asm} will remain unchanged after the @code{asm}; 
it will reload them as needed.  This effectively forms a read/write 
memory barrier for the compiler.


Note that this clobber does not prevent the @emph{processor} from doing 
speculative reads past the @code{asm} statement. To stop that, you need 
processor-specific fence instructions.


Objections?

dw


Re: Anyone used Graphite of Gentoo recently?

2014-03-30 Thread Tobias Grosser

On 03/31/2014 06:25 AM, Vladimir Kargov wrote:

On 27 March 2014 18:39, Mircea Namolaru  wrote:

The domain is computed on basis of the information provided by
number_of_latch_execution that returns the tree expression

(unsigned int) maxLen_6(D) - (unsigned int) minLen_4(D)

For signed integers (without the cast to unsigned int) this seems to be the
correct value. As an unsigned int expression it leads to incorrect domain.


I've got a couple of questions with regards to wrapping. Pasting the
relevant code from graphite-sese-to-poly.c:

static isl_pw_aff *
extract_affine (scop_p s, tree e, __isl_take isl_space *space)
{
...
   // e comes from number_of_latch_executions()
   type = TREE_TYPE (e);
   if (TYPE_UNSIGNED (type))
 res = wrap (res, TYPE_PRECISION (type));

1) Any idea why wrapping occurs only for unsigned expressions?


In the C standard, unsinged operations have defined overflow semantics 
in form of wrapping. Signed operations instead have undefined behavior, 
which means we can assume that no wrapping occurs and consequently do 
not need to model it.



2) What exactly is wrapping needed for? I can't find it in the old PPL
implementation (though it could have been called differently).


it is necessary to model the defined overflow behavior of unsigned integers.


Also, no matter what the logic behind wrapping is, it does seem
suspicious that this code checks the signedness of the result of
number_of_latch_execution() (which may be arbitrary, as far as I
understood), and not of the loop induction variable, for example.


It is very suspicious. It is a rather difficult topic and I doubt it is 
implemented correctly. Also, I do not think that implementing wrapping 
this way is the right approach. Instead, we should just model it to
extract a run-time check that verifiers that no wrapping occurs and then 
go one without wrapping.


Regarding this bug there are two directions to go:

1) It is necessary to understand if we need to do wrapping on the result 
of number_of_latch_executions. Meaning, we should understand the 
semantics of this function and the expression it returns.


2) There is something else happening?? From my observations it seems
that the generated code at least for this test case should behave 
correctly and the relevant loop should be executed exactly twice. 
Surprisingly this is not the case. It would be interesting to understand 
what exactly prevents this loop from being executed. (From the clast, 
this is not obvious to me).


Tobi