
#14626: No need to enter a scrutinised value -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: heisenbug Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: performance Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13861 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by heisenbug): Replying to [comment:33 heisenbug]:
It looks ''unary'' to me!
Interesting, there is a saturated static constructor defined in `Outputable` {{{ ==================== Cmm produced by codegen ==================== 2018-01-13 13:02:23.081236 UTC [section ""data" . Outputable.defaultUserStyle1_closure" { Outputable.defaultUserStyle1_closure: const Outputable.PprUser_con_info; const Outputable.neverQualify_closure+1; const Outputable.AllTheWay_closure+1; const Outputable.Uncoloured_closure+1; const 3; }] ==================== Cmm produced by codegen ==================== 2018-01-13 13:02:23.081545 UTC [section ""data" . Outputable.defaultUserStyle_closure" { Outputable.defaultUserStyle_closure: const Outputable.defaultUserStyle_info; const 0; }, Outputable.defaultUserStyle_entry() // [R2] { info_tbl: [(chd7, label: Outputable.defaultUserStyle_info rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 5} })] stack_info: arg_space: 8 updfr_space: Just 8 } {offset ... }}} ''Side question: which optimisation creates this guy?'' All uses of the `Outputable.defaultUserStyle1_closure` in `Outputable` ''are'' tagged with `1`, e.g.: {{{ R1 = Outputable.defaultUserStyle1_closure+1; }}} But this is not the case in the module `AsmCodeGen`: {{{ P64[Hp - 16] = Outputable.defaultUserStyle1_closure; }}} This explains why there is no tag sometimes, but the tag being present most of the time. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14626#comment:34 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler