[patch middle-end c c++]: Optimize cost of comp_type_attributes
Jason Merrill
jason@redhat.com
Thu Mar 24 12:00:00 GMT 2011
On 03/24/2011 11:56 AM, Kai Tietz wrote:
> + if (TREE_VALUE (a) != NULL_TREE
> + && TREE_CODE (TREE_VALUE (a)) == TREE_LIST
> + && TREE_VALUE (attr) != NULL
> + && TREE_CODE (TREE_VALUE (attr)) == TREE_LIST)
> + {
> + if (simple_cst_list_equal (TREE_VALUE (a),
> + TREE_VALUE (attr)) == 1)
> + break;
> + }
> + else if (simple_cst_equal (TREE_VALUE (a), TREE_VALUE (attr)) == 1)
How about splitting this out into a separate function that can compare
either list or expression arguments? That would also be useful for
merge_attributes and attribute_list_contained.
Jason
More information about the Gcc-patches
mailing list