This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: identifing free() in tree-ssa
- From: Roger Sayle <roger at eyesopen dot com>
- To: Olga Golovanevsky <OLGA at il dot ibm dot com>
- Cc: Razya Ladelsky <RAZYA at il dot ibm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 2 Jan 2007 14:30:45 -0700 (MST)
- Subject: Re: identifing free() in tree-ssa
Hi Olga,
On Tue, 2 Jan 2007, Olga Golovanevsky wrote:
> I wonder what is it a correct (and intelligent) way to identify free (p)
> function in tree-ssa. I have been looking for BUILT_IN_FREE or
> something similar in builtins.def, but did not find it.
I think recognizing "free" as a built-in (without an intrinsic) is the
correct way to go. In theory, all of the functions listed in
cp/cfns.gperf should be defined via builtins.def, but unfortunately
the compile-time (and memory) overhead of constructing a large number of
builtins at run-time is already noticeable. Hence, we only define
those that are most useful [even though I'd like to optimize away calls
to qsort where n is a compile-time constant zero or one! :-)]
If anyone has any ideas on how best these builtins can be constructed
statically and/or lazily, conveniently for those front-ends that can
benefit from them, I'd be very interested in suggestions. Iant's recent
tweak at http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01774.html was a
clever step in the right direction.
Roger
--