This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to support mark_constant_function marking pure functions
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: Patch to support mark_constant_function marking pure functions
- From: John Wehle <john at feith dot com>
- Date: Thu, 20 Sep 2001 20:10:58 -0400 (EDT)
Just curious where this patch:
http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01190.html
is in the queue. It was originally posted in November and was
updated, retested with the current source tree, and reposted in
August.
The patch allows the compiler to automatically recognize static
pure functions which helps the compiler produce better code.
The long term goal is to have mark_constant_function also handle
functions with simple loops that are known to terminated. I.e:
static int
subr (int a[3], int b[3])
{
int c;
int i;
int j;
c = 0;
for (i = 0; i < 3; i++)
for (j = 0; j < 3; j++)
c += a[i] * b[j];
}
is a pure function.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------