On Tue, May 03, 2005 at 08:23:59PM -0400, Ian Lance Taylor wrote: > Diego Novillo <[EMAIL PROTECTED]> writes: > > > GENERIC > > GOMP_PARALLEL <parallel_clauses data_clauses, body> > > > > GIMPLE > > GOMP_PARALLEL <g_parallel_clauses g_data_clauses, L1, L2> > > L1: > > g_body > > L2: > > I personally find it kind of baffling to have the same tree code act > differently in GENERIC and GIMPLE, a la SWITCH_EXPR. It seems to add > confusion for minimal benefit. If you are suggesting that the single > tree code GOMP_PARALLEL have different operands in GENERIC and GIMPLE, > can I suggest that you instead use two different tree coes? > That is a fundamental feature of both GENERIC and GIMPLE. GIMPLE is a non-strict subset of GENERIC. Every program in GIMPLE form is also in GENERIC form. The reverse, however, is not true.
If we did that we would need different codes for every tree code (MODIFY_EXPR, PLUS_EXPR, etc). Similarly, we would need different codes when we move from High-GIMPLE into Low-GIMPLE. I'm not sure that's worth the effort. From the point of view of analysis and optimizations the differences between the different ILs are mostly in the grammar, not their syntax. We could perhaps incorporate tokens to tell which IL we are dealing with. Currently, that is not really necessary because the IL is given implicitly by the phase of compilation that you are in. In the future, we may need to make the distinction if we become capable of starting the compilation process from an arbitrary IL dump file. Diego.