This is the mail archive of the 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: [lto] Stop using void_list_node in equality comparisons.

Hi Mark,

This patch changes those functions to expect void_type_node in
TREE_VALUE of the last TREE_LIST node.  This way, it is OK for one of
my conversion patches to introduce TYPE_ARG_TYPES that ends with a
TREE_LIST node (!= void_list_node) whose TREE_VALUE is still

Why do you want to do that?  The point of void_list_node is that it
reduces waste.  Almost every function will have a parameter type list
that ends with void, so it is good to share the node.

(Of course, a better representation would just be to have a varargs_p
bit on the FUNCTION_TYPE; it's goofy to have a void type at the end of
the list.  But, that would be another major cleanup, so we don't want to
do it now.)

Yes, void_list_node reduces waste, but we are not going to need it because it uses TREE_LIST. My patch to change the low-level representation will introduce void_vec_node, which is an instance of TREE_VEC with nothing but void_type_node in it, but it will not be used as frequently as void_list_node because void_list_node applies to every function with a fixed number of parameters, whereas void_vec_node applies to functions with no parameters.

Kazu Hirata

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