| Anonymous | Login | Signup for a new account | 2013-05-24 15:28 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005580 | OCaml | OCaml backend (code generation) | public | 2012-04-09 18:30 | 2012-09-21 14:14 | ||||||
| Reporter | jfc | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | x86-64 | OS | Linux | OS Version | |||||||
| Product Version | 3.12.1 | ||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0005580: Inlining misses some simple simplifications | ||||||||||
| Description | Consider this program: type t = False | True let of_bool = function true -> True | false -> False let x = of_bool true x should be assigned the constant True but ocamlopt generates a runtime comparison (true != false) to decide the result of of_bool. Closure.simplif_prim_pure receives the arguments p = Pintcomp Cneq approxs = [Value_constptr 1; Value_integer 0] If both approximations were Value_integer the comparison would be simplified. The function does not know how to compare a constptr and an integer. If I change simplif_prim_pure to add a case matching [Value_constptr x; Value_integer y] similarly to [Value_integer x; Value_integer y] code generation improves. I don't understand the compiler well enough to know if that is the correct solution. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-04-09 18:30 | jfc | New Issue | |
| 2012-04-10 15:55 | doligez | Status | new => acknowledged |
| 2012-07-09 17:39 | 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-21 14:14 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |