This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: My opinions on tree-level and RTL-level optimization


On Sun, Apr 17, 2005 at 03:19:43PM +0200, Björn Haase wrote:
> Hi,
> 
> while lacking the deep insight into GCC internals most of you have, I'd never 
> the less like to ask you to be very prudent concerning the issue of removal 
> of seemingly unnecessary RTL optimizations.
> In contrast to 32 bit targets, for 8 and 16 bit targets the RTL representation 
> possibly might look completely different than the corresponding tree 
> representation of the code: 
> In my opinion, now that the new tree optimizations exist, it might finally be 
> a good approach to let all the optimizations that could be done on original 
> DI/SI/HI mode expressions be done on the tree level already. Then one could 
> expand the DI/SI/HI mode expressions at RTL generation to only refer to the 
> processor's native word length modes. What one would get then is a RTL which 
> has about nothing to do with the corresponding tree representation.
> 
> For 8/16 bit target and gcc3 it seems that it used to be necessary to do the 
> expansion/splitting extremely late since optimizations on SI/HI mode 
> expressions required to keep SI/HI mode objects at least until reload. Now 
> hopefully one could consider to do the splitting much earlier and with the 
> help of the existing RTL optimizers one might be able to find many additional 
> optimization possibilities. 

This does not conflict with removing RTL optimizers.  Right now, the
most natural time to do this sort of lowering is at expand; but there's
no fundamental reason why it could not be done on trees, just before
expand, and rerun relevant tree optimizers after doing so.  Same as the
issues for "long long" splitting that Roger mentioned.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]