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: [ast-optimizer-branch] Simplification of Simple grammar


On Wed, 2002-03-27 at 08:38, Sebastian Pop wrote:

> I think that the scope of Simple is to simplify the analysis and transformations
> we will write on Simple.  Since we don't lose information by transforming
> all switches in nested IF_STMTs, or transforming all loop structures 
> into DO_STMTs, I propose to simplify Simple grammar a little. 
> 
Actually, we lose valuable information if we simplify the grammar any
further.  The main example that comes to mind are FOR loops.  Once you
convert them to an IF/DO_WHILE combination, you lost the original
semantics and things get ugly for things like loop parallelization.

My suggestion is that for GOTO elimination, you create another pass to
further simplify the control structure into low-SIMPLE.  I would rather
do things in phases.  Some analyses and/or transformations might be
better done in high-SIMPLE.

After all, the grammar for low-SIMPLE that you're proposing is a strict
subset of high-SIMPLE.  The RTL conversion does not need to change. 
Furthermore, doing this in phases will give us better control when we
start testing transformations.  We have to watch out for code bloat and
increased compilation times.  It's easier to calibrate things when
dealing with lego-like modules instead of one monstruous black-box.


Diego.


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