You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ocamlopt.opt -intf-suffix .no-mli -c -impl foo.ml -Oclassic
File "foo.ml", line 6, characters 13-44:
6 | let wrap x = (loop_impl [@inlined always]) x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 55 [inlining-impossible]: Cannot inline:
the optimizer did not know what function was being applied (is it marked [@inline never]?)
(the full inlining stack was: foo.ml:6,13--44)\
This behavior is confusing: the function is marked as inline always, but does not actually get inlined by OClassic. There's two ways to go about that:
Make OClassic inline this function, but this will make OClassic's behavior diverge from the historical closure behavior
Do not inline this function, but emit a better warning saying something along the line of "Can't inline in OClassic because the function contained subfunctions"
The text was updated successfully, but these errors were encountered:
For reference, Closure produces the following output:
File "foo.ml", line 6, characters 13-44:
6 | let wrap x = (loop_impl [@inlined always]) x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 55 [inlining-impossible]: Cannot inline: Function information unavailable
We should have enough information in classic mode to emit a better warning.
The following snippet behaves differently between OClassic and O3:
Works with
-O3
:Warns with
-OClassic
:This behavior is confusing: the function is marked as
inline always
, but does not actually get inlined by OClassic. There's two ways to go about that:The text was updated successfully, but these errors were encountered: