#2670: Record selectors behaving badly wrt optimisation
------------------------------+---------------------------------------------
Reporter: simonmar | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 6.10.2
Component: Compiler | Version: 6.8.3
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown/Multiple
Os: Unknown/Multiple |
------------------------------+---------------------------------------------
Changes (by simonpj):
* summary: Performance regression => Record selectors behaving badly wrt
optimisation
Comment:
Just adding a couple more notes:
* When field packing/unpacking is involved, if the selector is not
inlined bodily (perhaps it is big), then we'd like strictness and CPR
info; and indeed a worker/wrapper split. Again that argues for making
them ordinary functions.
* Injecting the selectors into the CoreBinds early (ie at the start of
the optimisation passes) doesn't help much. Since they are `GlobalIds`,
any uses of the selectors still don't "see" the bindings, instead using
the unfolding put inside the selector by `MkId`.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2670#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs