This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH] Fix a couple of issues in gimple-ssa-sprintf.c


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


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