Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004918OCaml~DO NOT USE (was: OCaml general)public2009-11-13 17:042016-12-06 22:51
Reporterviktorva 
Assigned Toshinwell 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.03.0 
Summary0004918: Inlining & direct function application optimisation
Descriptionocamlopt 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
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016680)
shinwell (developer)
2016-12-06 22:49

This deficiency should be fixed by Flambda, which can re-examine the results of inlining.

- Issue History
Date Modified Username Field Change
2009-11-13 17:04 viktorva New Issue
2009-12-08 17:32 doligez Status new => acknowledged
2012-07-11 13:33 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-17 17:43 doligez Severity minor => feature
2012-09-17 17:43 doligez Target Version 4.00.1+dev => 4.01.0+dev
2013-07-29 15:30 doligez Target Version 4.01.0+dev =>
2016-12-06 22:49 shinwell Note Added: 0016680
2016-12-06 22:50 shinwell Status acknowledged => resolved
2016-12-06 22:50 shinwell Fixed in Version => 4.03.0
2016-12-06 22:50 shinwell Resolution open => fixed
2016-12-06 22:50 shinwell Assigned To => shinwell
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker