[Bug fortran/31067] MINLOC should sometimes be inlined (gas_dyn is sooooo sloooow)
tkoenig at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Mar 11 19:43:00 GMT 2007
------- Comment #9 from tkoenig at gcc dot gnu dot org 2007-03-11 19:43 -------
I have looked at this some more. Channging gfc_conv_intrinsic_function so that
we call gfc_conv_intrinsic_minmaxloc is easy enough:
@@ -3481,7 +3481,9 @@ gfc_conv_intrinsic_function (gfc_se * se
name = &expr->value.function.name[2];
- if (expr->rank > 0 && !expr->inline_noncopying_intrinsic)
+ if (expr->rank > 0 && !expr->inline_noncopying_intrinsic
+ && ! (expr->rank == 1 && (isym->generic_id == GFC_ISYM_MINLOC
+ || isym->generic_id == GFC_ISYM_MAXLOC)))
{
lib = gfc_is_intrinsic_libcall (expr);
if (lib != 0)
If we do that, we hit the "if (se->ss)" contition on top of that function, and
we would have to handle scalarization of that one-trip loop. I have currently
no idea how to go about that. Simply removing the condition doesn't work :-)
As a workaround, one could always use "minloc(...,dim=1)", then
we get the inline version.
Unassigning myself.
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|tkoenig at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31067
More information about the Gcc-bugs
mailing list