This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/31067] MINLOC should sometimes be inlined (gas_dyn is sooooo sloooow)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]