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][RFC] middle-end array expressions (II)


Richard Guenther wrote:

This is the final proposal for the introduction of arrays as first
class citizens of the middle-end.

Thanks for working on this.


  float Btmp[n] = VLA <n, 1> (B);
  float B1 = VLA_IDX <i> (Btmp);
  float B2 = VLA_IDX <i+2> (Btmp);
  float tmp = B1 + B2;
  float Atmp = VLA_RIDX <i> (tmp);
  VLA <n-2, 1> (A) = Atmp;

What you're doing here seems naturally to me, possibly because it's got some POOMA-esque aspects that are familiar to us both. Do you know what representation is used in other compilers for array operations? Kenny do you?


Why did you settle on using scalar placeholders, rather than full array operations, ala Fortran?

Can you easily express transpose in the above framework? I think you can: you make a view of your target array that flips the strides between dimensions, and then assign into it. But, is that natural from a compilation point of view?

Thanks,

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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