[GHC] #14821: -O2 forces -optlo-O3 in a way that cannot be overridden at command line

GHC ghc-devs at haskell.org
Sun Feb 18 16:01:16 UTC 2018


#14821: -O2 forces -optlo-O3 in a way that cannot be overridden at command line
-------------------------------------+-------------------------------------
           Reporter:  joeyhess       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.2
  (LLVM)                             |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I would expect -O2 -optlo-O2 to pass -O2 to the llvm optimiser. However,
 it seems that -O2 implies -optlo-O3, overriding the command-line's
 -optlo-O2.

 The workaround seems to be to use -O1 -optlo-O2, but of course this misses
 some ghc optimizations.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14821>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list