Skip to content
  • Yang Chen's avatar
    Enable to build reduce-array-dim pass · 18ce1a66
    Yang Chen authored
    This pass reduces the dimension of an array. Each transformation iteration
    reduces one dimension in the following way:
      int a[2][3][4];
      void foo(void) {... a[1][2][3] ... }
    ===>
      int a[2][3 * 4];
      void foo(void) {... a[1][3 * 2 + 3] ... }
    The binary operations will be computed to constant during the
    transformation if possible. Array fields are not handled right now.
    Also, this pass only works with ConstantArrayType and IncompleteArrayType.
    18ce1a66