File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
middle_end/flambda2/to_cmm Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1114,6 +1114,9 @@ let int_array_ref arr ofs dbg =
1114
1114
let unboxed_float_array_ref arr ofs dbg =
1115
1115
Cop (mk_load_mut Double , [array_indexing log2_size_float arr ofs dbg], dbg)
1116
1116
1117
+ let unboxed_immutable_float_array_ref arr ofs dbg =
1118
+ Cop (mk_load_immut Double , [array_indexing log2_size_float arr ofs dbg], dbg)
1119
+
1117
1120
let float_array_ref mode arr ofs dbg =
1118
1121
box_float dbg mode (unboxed_float_array_ref arr ofs dbg)
1119
1122
Original file line number Diff line number Diff line change @@ -220,6 +220,9 @@ val int_array_ref : expression -> expression -> Debuginfo.t -> expression
220
220
val unboxed_float_array_ref :
221
221
expression -> expression -> Debuginfo .t -> expression
222
222
223
+ val unboxed_immutable_float_array_ref :
224
+ expression -> expression -> Debuginfo .t -> expression
225
+
223
226
val float_array_ref :
224
227
Lambda .alloc_mode -> expression -> expression -> Debuginfo .t -> expression
225
228
Original file line number Diff line number Diff line change @@ -123,10 +123,7 @@ let block_load ~dbg (kind : P.Block_access_kind.t) (mutability : Mutability.t)
123
123
match field_kind with
124
124
| Tagged_immediate ->
125
125
C. get_field_computed Immediate mutability ~block ~index dbg
126
- | Naked_float ->
127
- (* CR layouts v5.1: We should use the mutability here to generate better
128
- code if the load is immutable. *)
129
- C. unboxed_float_array_ref block index dbg
126
+ | Naked_float -> C. unboxed_immutable_float_array_ref block index dbg
130
127
| Naked_float32 -> C. get_field_unboxed_float32 mutability ~block ~index dbg
131
128
| Naked_int32 -> C. get_field_unboxed_int32 mutability ~block ~index dbg
132
129
| Naked_int64 | Naked_nativeint ->
You can’t perform that action at this time.
0 commit comments