[GHC] #14214: Users guide lies about default optimization level

#14214: Users guide lies about default optimization level -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Documentation Unknown/Multiple | bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- #14208 points out that the users guide claims that the default optimization level is `-O0`. However this apparently isn't true. We should decide whether this should be the default and, if so, identify and fix the differences. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14214 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14214: Users guide lies about default optimization level -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by bgamari: Old description:
#14208 points out that the users guide claims that the default optimization level is `-O0`. However this apparently isn't true. We should decide whether this should be the default and, if so, identify and fix the differences.
New description: ticket:14208#comment:5 points out that the users guide claims that the default optimization level is `-O0`. However this apparently isn't true. We should decide whether this should be the default and, if so, identify and fix the differences. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14214#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14214: Users guide lies about default optimization level -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by harendra): There are a number of issues with the documentation of optimization options. I guess all those can be dealt with in this ticket. 1) The inconsistency described above in the ticket description is in the "Flag Reference" chapter: {{{ Flag Description Type Reverse -O0 Disable optimisations (default) dynamic -O }}} 2) I would also suggest that we have another column in the "6.6.15. Individual optimisations" section to indicate which optimization levels enable each option. It could be in the form "0, 1, 2". This will really help in quickly identifying the options applicable to a particular level. 3) 6.3.1. -O*: convenient “packages” of optimisation flags. This section should perhaps mention what is the default? 4) 6.3.1. -O*: convenient “packages” of optimisation flags. This section says: "The easiest way to see what -O (etc.) “really mean” is to run with -v, then stand back in amazement." But when I tried it "-v" did not tell me what options are enabled. 5) Some flags are documented like this: {{{ -fno-opt-coercion Default: off Turn off the coercion optimiser. }}} This is confusing. It says "Default: off", the double negation would mean that "-fopt-coercion" is "on". Is that the case? Is there a "-fopt- coercion"? If yes, can we document that instead? If not, we can be more explicit about the double negation. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14214#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14214: Users guide lies about default optimization level -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * owner: (none) => bgamari -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14214#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14214: Users guide lies about default optimization level -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * cc: patrickdoc (added) Comment: CCing patrickdoc, who has some great work on improving documentation in the past. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14214#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14214: Users guide lies about default optimization level -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): In response to comment:2: Regarding (2): It would be great to have the documentation specify precisely which flags each of the optimisation levels implies. However, I think we would ideally like to have these lists generated from the implementation; otherwise it's only a matter of time until they fall out- of-date. Regarding (3): I believe that as of b2b416014e4276ebb660d85c3a612f7ca45ade78 there is now such a mention. Regarding (4): Indeed, it looks like this has been out-of-date for quite a long time; I don't remember a time when `-v` told you anything about which optimisation flags were used. Regarding (5): I absolutely agree. The documentation for some of these flags is incredibly confusing. What makes things complicated is that `-fopt-coercion` doesn't currently exist. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14214#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14214: Users guide lies about default optimization level -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4098 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * differential: => Phab:D4098 Comment: See Phab:D4098 for a first cut. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14214#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14214: Users guide lies about default optimization level
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: bgamari
Type: bug | Status: new
Priority: high | Milestone: 8.4.1
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Documentation | Unknown/Multiple
bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4098
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#14214: Users guide lies about default optimization level -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4098 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * priority: high => normal Comment: Merged comment:6 although I'll leave this open since I think we could improve this further. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14214#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC