
#8472: Primitive string literals prevent optimization -------------------------------------+------------------------------------- Reporter: akio | Owner: gridaphobe Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: newcomer Operating System: Linux | Architecture: x86_64 Type of failure: Runtime | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Excellent work!
Perhaps you meant to check the invariant in `CoreLint`?
Yes I did. Sorry for the confusion here.
I introduce a new `StgRhs` constructor rather than your `StgTopBinding` type. I think your approach is a bit better,
I have not looked at the details, but since we are only talking about introducing a new ''top-level'' form, it makes sense for the data type to reflect that if it's convenient to do so.
(I also notice that both of our patches could use a nice Note explaining why we want to bind string literals at the top level, especially since the logic is spread across multiple phases of the compiler)
YES PLEASE! Also document invariants in `CoreSyn`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8472#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler