Re: array index checking optimizations?

Laurent Guerby <Laurent.Guerby@enst-bretagne.fr>
1 May 1996 23:03:10 -0400

          From comp.compilers

Related articles
array index checking optimizations? adams@yaroslav.ai.mit.edu (1996-04-29)
Re: array index checking optimizations? bill@amber.ssd.hcsc.com (1996-04-30)
Re: array index checking optimizations? kik@zia.cray.com (1996-04-30)
Re: array index checking optimizations? tmb@best.com (1996-05-01)
Re: array index checking optimizations? Laurent.Guerby@enst-bretagne.fr (Laurent Guerby) (1996-05-01)
Re: array index checking optimizations? markt@harlequin.co.uk (1996-05-01)
array index checking optimizations? dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-05-02)
Re: array index checking optimizations? mad@math.keio.ac.jp (1996-05-03)
Re: array index checking optimizations? prener@watson.ibm.com (1996-05-03)
Re: array index checking optimizations? ben@sys.toronto.edu (1996-05-03)
Re: array index checking optimizations? dlmoore@ix.netcom.com (1996-05-03)
[2 later articles]
| List of all articles for this month |

From: Laurent Guerby <Laurent.Guerby@enst-bretagne.fr>
Newsgroups: comp.compilers
Date: 1 May 1996 23:03:10 -0400
Organization: Compilers Central
References: 96-04-140 96-04-162
Keywords: optimize

Bill Leonard writes
[deleted]
: If the bounds are compile-time constants (unlikely for array
                                                                                        ^^^^^^^^^^^^^^^^^^
: arguments, at least in Ada), then I believe our compiler would
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
: correctly eliminate the index tests, assuming that the initial value
: of 'i' is within bounds.


      I think you mean "for unconstrained array arguments". There's some
room for optimization on the calling side if the formal parameter type
is a constrained array type. The use of the strong typing of the Ada
language here is a good way to allow your compiler to perform some
smart optimization, the more information you provide it (by declaring
some "ranged" integer types and not simply predefined integer) the
better the code could be.


      The chapter 10, "Improving performance", of the Ada Quality & Style
provides an interesting discussion about these issues. It's freely
available in various format at the URL :


ftp://sw-eng.falls-church.va.us/public/AdaIC/docs/style-guide/95style/


      and hypertext at :


http://sw-eng.falls-church.va.us/AdaIC/docs/style-guide/95style/html/contents.html


-- Laurent Guerby, student at Telecom Bretagne (France), Team Ada.
-- http://www-eleves.enst-bretagne.fr/~guerby/ (GATO Project).
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.