We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original bug ID: 4918 Reporter: viktorva Assigned to: @mshinwell Status: resolved (set by @mshinwell on 2016-12-06T21:50:59Z) Resolution: fixed Priority: normal Severity: feature Fixed in version: 4.03.0 Category: ~DO NOT USE (was: OCaml general) Monitored by: ronan.lehy@gmail.com "Julien Signoles" @hcarty
ocamlopt does not recognise direct function applications which arise from inlining even trivial functions. For example,
let id f = f let rec f n = if n <= 0 then 0 else n * f (n - 1)
let _ = f 10 let _ = id f 20
generates:
... mov eax, 21 call _camlTest__f_60 % Direct call for f 10 L105: mov ebx, DWORD PTR _camlTest+4 mov eax, 41 mov ecx, DWORD PTR [ebx] call ecx % Indirect call to f 20 L106:
The call to id is correctly inlined, but then the direct call is not recognised.
See: ocaml/asmcomp/closure.ml
The text was updated successfully, but these errors were encountered:
Comment author: @mshinwell
This deficiency should be fixed by Flambda, which can re-examine the results of inlining.
Sorry, something went wrong.
mshinwell
No branches or pull requests
Original bug ID: 4918
Reporter: viktorva
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2016-12-06T21:50:59Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 4.03.0
Category: ~DO NOT USE (was: OCaml general)
Monitored by: ronan.lehy@gmail.com "Julien Signoles" @hcarty
Bug description
ocamlopt does not recognise direct function applications which arise from inlining even trivial functions. For example,
let id f = f
let rec f n = if n <= 0 then 0 else n * f (n - 1)
let _ = f 10
let _ = id f 20
generates:
...
mov eax, 21
call _camlTest__f_60 % Direct call for f 10
L105:
mov ebx, DWORD PTR _camlTest+4
mov eax, 41
mov ecx, DWORD PTR [ebx]
call ecx % Indirect call to f 20
L106:
The call to id is correctly inlined, but then the direct call is not recognised.
See: ocaml/asmcomp/closure.ml
The text was updated successfully, but these errors were encountered: