message: [MLIR][KernelGen] Make buffer reuse analysis consider aliases for buffer sizes
  When analyzing the underlying buffer sizes, consider aliases. An alias of a
  buffer naturally has the same size.
diff: @@ -55,6 +55,52 @@ func @local_reuse_with_memref_maps(
  return %result : memref<?xi64, offset: 2, strides: [3]>
  }
  +// CHECK-LABEL: @memref_reinterpret_cast_alias
  +func @memref_reinterpret_cast_alias(%arg : memref<f32>, %n : index)
  + -> memref<?xf32> attributes {tf_entry} {
  + %c0 = constant 0 : index
  + %reinterpreted = memref_reinterpret_cast %arg to
  + offset: [0],
  + sizes: [%n],
  + strides: [%c0]: memref<f32> to memref<?xf32>
  +
  + // CHECK: alloc
  + // CHECK-SAME: reuse_input_candidates = [0 : index]
  + %result = alloc(%n) : memref<?xf32>
  +
  + // reinterpreted (arg) and result are of same size.
  + linalg.generic {
  + indexing_maps = [affine_map<(d0) -> (d0)>, affine_map<(d0) -> (d0)>],
  + iterator_types = ["parallel"]
  + } ins(%reinterpreted : memref<?xf32>) outs(%result : memref<?xf32>) {
  + ^bb0(%a : f32, %b : f32):
  + linalg.yield %a : f32
  + }
  +
  + return %result : memref<?xf32>
  +}
  +
  +// CHECK-LABEL: @memref_cast_alias
  +func @memref_cast_alias(%arg : memref<*xf32>, %n : index)
  + -> memref<?xf32> attributes {tf_entry} {
  + %casted = memref_cast %arg : memref<*xf32> to memref<?xf32>
  +
  + // CHECK: alloc
  + // CHECK-SAME: reuse_input_candidates = [0 : index]
  + %result = alloc(%n) : memref<?xf32>
  +
  + // reinterpreted (arg) and result are of same size.
  + linalg.generic {
  + indexing_maps = [affine_map<(d0) -> (d0)>, affine_map<(d0) -> (d0)>],
  + iterator_types = ["parallel"]
  + } ins(%casted : memref<?xf32>) outs(%result : memref<?xf32>) {
  + ^bb0(%a : f32, %b : f32):
  + linalg.yield %a : f32
  + }
  +
  + return %result : memref<?xf32>
  +}
  +
  // CHECK-LABEL: @indirect_size_equality
  func @indirect_size_equality(%arg0 : memref<?xi64>,
  %arg1 : memref<?xi64>,
  