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: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 (firstname.lastname@example.org).
One a little mistake:
if (simple_cst_equal (TREE_VALUE (tv1), TREE_VALUE (tv2))
! 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.