Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005873OCaml~DO NOT USE (was: OCaml general)public2013-01-04 16:532016-12-06 22:54
Reportergerd 
Assigned Toshinwell 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.00.1 
Target VersionFixed in Version4.03.0 
Summary0005873: Feature: control inlining better
DescriptionI propose to add a feature for controlling inlining, in order to prevent performance bugs like 0005872.

There are basically two options: instruct the compiler about inlining, or check inlining afterward:

1) The compiler could honour a new command-line option [-inline-function name] which would recommend this function for inlining. If it is not inlined, a warning is emitted (and if the warning is fatal, an error).

2) Extend ocamlobjinfo so that it can check whether a function was inlined. Add switch: [-check-inlining name] which outputs something when the function (identified by an OCaml identifier, not by an asm symbol) is not marked for inlining, and the exit code is non-0 in this case.

Of course, the goal of adding such a feature is to include the recommendations or checks into the build, so that we get automation. This is especially useful because OCaml doesn't define when inlining is possible, and because every OCaml version may behave differently in this respect.
TagsNo tags attached.
Attached Files

- Relationships
related to 0005872closed Performance: Buffer.add_char is not inlined 

-  Notes
(0016682)
shinwell (developer)
2016-12-06 22:54

Flambda provides attributes to control inlining and inlining reports to show which inlinings did and did not happen. I think this should suffice.

- Issue History
Date Modified Username Field Change
2013-01-04 16:53 gerd New Issue
2013-06-28 18:14 doligez Relationship added related to 0005872
2013-06-28 18:16 doligez Status new => confirmed
2016-12-06 22:54 shinwell Note Added: 0016682
2016-12-06 22:54 shinwell Status confirmed => resolved
2016-12-06 22:54 shinwell Fixed in Version => 4.03.0
2016-12-06 22:54 shinwell Resolution open => fixed
2016-12-06 22:54 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