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: About the is_gimple_min_invariant predicate


On 7/5/07, Richard Guenther <richard.guenther@gmail.com> wrote:
The same reason why we have operands 3 and 4 for ARRAY_REFs.  Ada (I believe
it's only ada right now) has types that have their offsets computed at
compile-time, so
we put gimplified values of this stuff there if it doesn't match what
we can trivially
compute from the type.

GNU C has it too:


int f(int n)
{
 struct s
 {
   struct {
     int i[n];
   } i[n];
   int i1[n];
 } s1;
 int i, j;
 for(i = 0;i<n;i++)
    for(j=0;j<n;j++)
      s1.i[i].i[j] = i+j;
 for(i = 0;i<n;i++)
   s1.i1[i] = i*2;
 return s1.i[n/2].i[n/2] + s1.i[n/2];
}


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