This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29550] Optimize -fexternal-blas calls for conjg()
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2006 18:21:52 -0000
- Subject: [Bug fortran/29550] Optimize -fexternal-blas calls for conjg()
- References: <bug-29550-1719@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from fxcoudert at gcc dot gnu dot org 2006-11-04 18:21 -------
(In reply to comment #4)
> Can't you use the same trick that the frontend already uses to detect the
> matmul(transpose(a),b) thing?
The front-end doesn't "detect" the case you quote. It's only that transposition
is done by creating a new array descriptor, pointing to the same data but with
inverted strides; matmul being able to operate on all possible strides, it is
indeed optimal.
For conjugation, it's a bit more difficult. We really need the front-end to
recognize if one argument of matmul is conjugated, and simplify the code itself
by 1) removing the conjugation and 2) emitting a different matmul call. The
fact that there is no BLAS routine for matmul(conj(a),b) but only
matmul(tranpose(conj(a))) makes it a bit more difficult.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29550