Paolo Bonzini wrote:
The main difference that springs to mind: SIN is built-in, MATMUL is a library
function. In gcc/builtin.defs, one finds
Not just that: SIN is a pure (or const, depending on -frounding-math)
function, which can be subject to CSE and DCE. I don't see anything
suggesting that for MATMUL in intrinsic.c. In fact, since MATMUL
receives the return array by reference and writes to it, it would be
very wrong to make MATMUL const or pure.
While this is true on the level the middle end looks at things, on the
level of the Fortran front end, MATMUL simply is a constant function
that takes two arrays and returns one (result) array.
I talked about that at the GCC Summit 2007; see
http://moene.org/~toon/GCCSummit-2007.pdf.
Cheers,
--
Toon Moene - e-mail: t...@moene.org (*NEW*) - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.4/changes.html