CSE optimization question

Steve Ellcey sje@cup.hp.com
Wed Jan 9 17:47:00 GMT 2002


I have been investigating some optimization issues with GCC and ran into
an issue with PATHLENGTH in cse.c.  On one particular program I was
testing I found that a small source change could have a big impact by
making a particular path through my program greater or smaller then
PATHLENGTH, thus either doing or not doing some CSE optimizations.

It looks like there is no method for overriding or changing this value
other then editing cse.c and it seems like it might be useful to do so,
at least in order to try different values in order to see what effect it
has.  So I was thinking of making this a settable parameter using
params.def to give it a name (max-cse-path) and default value (10).
Does this seem reasonable?

Currently it has to be a macro because it is used to create an array
called path in the cse_basic_block_data structure but I thought I could
get around that by making the cse_basic_block_data structure contain a
pointer to an array instead of the array itself and then allocate (and
deallocate) the array in cse_main where the only variable of type
cse_basic_block_data is declared.

Comments?

Steve Ellcey
sje@cup.hp.com



More information about the Gcc mailing list