This is the mail archive of the gcc-patches@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: [PATCH] Fix PR optimization/13653


> So this is a variable that's declared within the loop and whose scope
> is just one loop iteration.  Is that the key?

Sort of, but it is not locally declared.  I guess it comes from the 
constructor for an object local to the loop.  The function is:

template <int Dim> BrickBase<Dim>::BrickBase(const Node<Domain_t> &node, bool 
compressible) : layout_m(node), compressibleBase_m(compressible) {
   strides_m[0] = 1;
   firsts_m[0] = domain()[0].first();
   off_m = -firsts_m[0];
   for (int d = 1; d < Dim; ++d) {
      firsts_m[d] = domain()[d].first();
      strides_m[d] = strides_m[d-1]*domain()[d-1].length();
      off_m -= domain()[d].first()*strides_m[d];
   }
}

-- 
Eric Botcazou


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