This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix a couple of issues in gimple-ssa-sprintf.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Richard Biener <rguenther at suse dot de>, Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 27 Nov 2016 22:40:55 +0100
- Subject: Re: [PATCH] Fix a couple of issues in gimple-ssa-sprintf.c
- Authentication-results: sourceware.org; auth=none
- References: <20161125172024.GJ3541@tucnak.redhat.com> <b89250ea-ee53-b2f0-fe26-26c9186a50f9@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sat, Nov 26, 2016 at 11:17:09AM -0700, Martin Sebor wrote:
> PS As the comment above the build_intmax_type_node function
> mentions, its body was copied from lto/lto-lang.c. It would be
> useful not to have to duplicate the code in the middle-end and
> instead provide a shared definition of each of the nodes so that
> they could be used everywhere. Ditto for ptrdiff_type_node.
Well, every unnecessary or very rarely used global tree means typically
another GC root or global variable that needs to be handled on every garbage
collection. So the question is if it is worth it.
As for sharing the code, I've actually started writing such an inline
function, but then realized that every of the spots that use such a
technique does something slightly different.
Jakub