This is the mail archive of the
mailing list for the GCC project.
Re: PATCH [mainline] speed up comparing enums declared in multiple translation units
On Mar 11, 2004, at 10:27 AM, Andrew Pinski wrote:
On Mar 11, 2004, at 10:16, Fariborz Jahanian wrote:
I have incorporated Andrew Pinski's patch, which speeds up the case
where the enum type values are in
the same order, In this patch. Combined patch improves compile-time
build of mesa by additional 50%
(on my G5 512 Mbyte machine, build time went down from 13 minutes to
bootstrapped, dejagnu tested on PPC-darwin. OK for mainline?
- Fariborz Jahanian (email@example.com).
One a little mistake:
if (simple_cst_equal (TREE_VALUE (tv1), TREE_VALUE
(tv2)) != 1)
! res = 0, done = 1;
should really be:
if (simple_cst_equal (TREE_VALUE (tv1), TREE_VALUE (tv2)) != 1)
res = 0;
done = 1;
other wise you are going to do extra work when the two enums are not
! int res;
! int done;
These most likely should be bool instead and should use true/false
instead of 0 and 1.
res is return value for tagged_types_tu_compatible_p which is an 'int'.
I followed gcc's convention
which seems to use 'int' in place of bool in other places. But I don't
have a strong feel for this.
- Thanks, fariborz