[GHC] #13588: Simplify StgCase when all alternatives are the case binder

#13588: Simplify StgCase when all alternatives are the case binder -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.0.1 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: -------------------------------------+------------------------------------- Nudged by rwbarton, simponpj writes in ticket:13536#comment:16: Yes. It's really {{{ case e of w { p1 -> w; ...; pn -> w } ===> e }}} (Core has a more general version involving strictness on x.) I don't know how much it happens in practice. It would not be hard to include this in StgCse though. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13588 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13588: Simplify StgCase when all alternatives are the case binder
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: task | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#13588: Simplify StgCase when all alternatives are the case binder -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: patch Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3467 Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * status: new => patch * differential: => Phab:D3467 Comment: I gave it a shot: Phab:D3467 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13588#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13588: Simplify StgCase when all alternatives are the case binder -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: closed Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3467 Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * status: patch => closed * resolution: => fixed Comment: Harbormaster is happy with this commit, so I pushed it. I will report any perf findings once they are in (but I do not expect any). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13588#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13588: Simplify StgCase when all alternatives are the case binder
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: task | Status: closed
Priority: low | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3467
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#13588: Simplify StgCase when all alternatives are the case binder -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: closed Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3467 Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): As expected, no change, not evan a single byte of binary size change. But even if code out there makes heavy use of both newtypes in polymorphic data structures, I doubt we would find it in the nofib suite. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13588#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC