This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: [Fortran-dev, patch] Use only lbound/extent/sm in the array descriptor


Hi Tobias,

with that patch, the array descriptor on the fortran-dev branch uses now
the dimension triplet as defined in TS29113. This patch removes
ubound/stride and updates all calls.

Great!



There are still 227 test-suite failures ("FAIL" lines) affecting 27
test-suite files. That's slightly down from the 269 lines the branch
currently has. (Some issues can be fixed by modifying the tree dump
patterns, but most seem to be "real" problems.)

Build and regtested on x86-64-linux.
OK for the branch?

The library parts look OK to me.


There is just one point of efficiency.

+#define GFC_DESCRIPTOR_STRIDE(desc,i) \
+  (GFC_DESCRIPTOR_SM(desc,i) / GFC_DESCRIPTOR_SIZE(desc))

In most generated files, GFC_DESCRIPTOR_SIZE is a constant known
at compile-time (and usually a power of two), which means that the
division can be done in a simple shift. If we get the size from the descriptor, we actually have to divide, which is expensive.


I would commit the patch now, adding

TODO: - Fixing the regressions. - Cleanup of the library and the front end - Switching also from ubound -> extent for nondescriptor arrays? - Properly implement subpointers

- Avoid division for GFC_DESCRIPTOR_STRIDE where possible.


Thomas


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