Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005541OCamlback end (clambda to assembly)public2012-03-15 13:452012-09-24 13:15
Assigned To 
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version 
Summary0005541: Pervasives.min/max are not inlined
DescriptionI just observed that min/max are not inlined. This prevents that further optimizations on the comparison operator can be applied - min/max always use compare_val.

Maybe compiling Pervasives with a slightly increased inlining limit already solves the problem.
Steps To Reproduceocamlobjinfo <path>/pervasives.cmx
TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0004808resolved better compilation of min and max 
has duplicate 0005592resolved inlining does not reduce polymorphism to concrete type to generate optimized code 

-  Notes
xleroy (administrator)
2012-03-16 10:12

Unfortunately, type-based specialization of comparisons takes place before inlining. In other words, even if min & max were inlined, they would still use the generic comparison operator. That's one of the several weaknesses of the OCaml inliner. I'm not expecting a solution soon, which is why I'm putting this PR in "suspended" state.

- Issue History
Date Modified Username Field Change
2012-03-15 13:45 gerd New Issue
2012-03-16 10:12 xleroy Note Added: 0007092
2012-03-16 10:12 xleroy Status new => resolved
2012-03-16 10:12 xleroy Resolution open => suspended
2012-04-08 19:34 xleroy Relationship added has duplicate 0004808
2012-04-17 20:20 gasche Relationship added has duplicate 0005592
2017-02-23 16:35 doligez Category OCaml backend (code generation) => Back end (clambda to assembly)
2017-02-23 16:44 doligez Category Back end (clambda to assembly) => back end (clambda to assembly)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker