Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004918OCamlOCaml generalpublic2009-11-13 17:042013-07-29 16:01
Reporterviktorva 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
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
There are no notes attached to this issue.

- 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 =>


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker