------- Additional Comments From amacleod at redhat dot com  2004-11-25 19:39 
-------
Created an attachment (id=7609)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7609&action=view)
patch to resolve the problem

First, we eliminate the linear search for duplicates when building VUSES
and VMAYDEFs. Instead, two bits are added to the var annotation and we
use those bits to determine whether a given var is already in the list
or not. 

second we speed up the code which adds virtual operands for the
call clobbered bit vector at each call site. Every time we had a call,
we iterated through the bitvector and built up an operand vector for
those variables.  Those variables dont change very often, so now we keep
a cache of the operand vector that is built. The next time we need the
clobbers for a call, we simply use the cache if it hasn't been
invalidated by adding or removing global variables.

The combined speedups from these two patches are pretty decent.

Average of two runs USER time for operand scanning phase on a 1.8Ghz P4.

                                  orig            patched
cplusplus-grammer.ii            22.58 sec       10.35 sec
tramp3d.ii                       6.14 sec        4.03 sec
generate3.4.ii                   1.69 sec        1.23 sec
all gcc .i files                 6.72 sec        5.83 sec

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18587

Reply via email to