@@ -389,7 +389,8 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
389
389
AggregateTy :: Array => {
390
390
assert ! ( fields. len( ) > 0 ) ;
391
391
let field_ty = fields[ 0 ] . layout . ty ;
392
- // Ignore nested array
392
+ // FIXME: Ignore nested arrays, because arrays is large. Nested arrays are rarer and bigger
393
+ // while we already process 1-dimension arrays, which is enough?
393
394
if field_ty. is_array ( ) {
394
395
trace ! (
395
396
"ignoring nested array of type: [{field_ty}; {len}]" ,
@@ -814,7 +815,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
814
815
}
815
816
Operand :: Copy ( ref mut place) | Operand :: Move ( ref mut place) => {
816
817
let value = self . simplify_place_value ( place, location) ?;
817
- // Ignore arrays in operands.
818
+ // In MIR, the array assignments are previously processed before operands.
818
819
if let Value :: Aggregate ( AggregateTy :: Array , ..) = self . get ( value) {
819
820
return None ;
820
821
}
@@ -927,7 +928,8 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
927
928
let ( mut ty, variant_index) = match * kind {
928
929
AggregateKind :: Array ( ty) => {
929
930
assert ! ( !field_ops. is_empty( ) ) ;
930
- // Ignore nested arrays
931
+ // FIXME: Ignore nested arrays, because arrays is large. Nested arrays are rarer and bigger
932
+ // while we already process 1-dimension arrays, which is enough?
931
933
if ty. is_array ( ) {
932
934
return None ;
933
935
}
0 commit comments