This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31067] MINLOC should sometimes be inlined (gas_dyn is sooooo sloooow)
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Jul 2011 13:52:33 +0000
- Subject: [Bug fortran/31067] MINLOC should sometimes be inlined (gas_dyn is sooooo sloooow)
- Auto-submitted: auto-generated
- References: <bug-31067-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31067
--- Comment #43 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-28 13:51:32 UTC ---
Created attachment 24856
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24856
gcc47-pr31067.patch
Patch to optimize a = minloc (b) for rank 1 b into a = minloc (b, dim = 1),
according to the standard the latter function is supposed to return the first
element of the array returned by former function (which should return a rank 1,
1 element array). So, by instead initializing the (one element) array with
the scalar we can get it actually inlined. Doing this during genericization
looked much harder to me.