-- allocate registers
(alloced, usAlloc, ppr_raStatsColor, ppr_raStatsLinear) <-
- if False
- -- Disabled, see #7679, #8657
- -- ( gopt Opt_RegsGraph dflags
- -- || gopt Opt_RegsIterative dflags)
+ if ( gopt Opt_RegsGraph dflags
+ || gopt Opt_RegsIterative dflags )
then do
-- the regs usable for allocation
let (alloc_regs :: UniqFM (UniqSet RealReg))
.. ghc-flag:: -fregs-graph
- *Off by default due to a performance regression bug. Only applies in
- combination with the native code generator.* Use the graph colouring
- register allocator for register allocation in the native code
- generator. By default, GHC uses a simpler, faster linear register
- allocator. The downside being that the linear register allocator
- usually generates worse code.
+ :default: off due to a performance regression bug (:ghc-ticket:`7679`)
+
+ *Only applies in combination with the native code generator.* Use the graph
+ colouring register allocator for register allocation in the native code
+ generator. By default, GHC uses a simpler, faster linear register allocator.
+ The downside being that the linear register allocator usually generates
+ worse code.
+
+ Note that the graph colouring allocator is a bit experimental and may fail
+ when faced with code with high register pressure :ghc-ticket:`8657`.
.. ghc-flag:: -fregs-iterative
- *Off by default, only applies in combination with the native code
- generator.* Use the iterative coalescing graph colouring register
- allocator for register allocation in the native code generator. This
- is the same register allocator as the ``-fregs-graph`` one but also
- enables iterative coalescing during register allocation.
+ :default: off
+
+ *Only applies in combination with the native code generator.* Use the
+ iterative coalescing graph colouring register allocator for register
+ allocation in the native code generator. This is the same register allocator
+ as the :ghc-flag:`-fregs-graph` one but also enables iterative coalescing
+ during register allocation.
.. ghc-flag:: -fsimplifier-phases=<n>