[GHC] #8472: Primitive string literals prevent optimization
GHC
ghc-devs at haskell.org
Thu Feb 2 04:38:05 UTC 2017
#8472: Primitive string literals prevent optimization
-------------------------------------+-------------------------------------
Reporter: akio | Owner: gridaphobe
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: fixed | 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): Phab:D2554,
Wiki Page: | Phab:D2605
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"f5b275a239d2554c4da0b7621211642bf3b10650/ghc"
f5b275a2/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="f5b275a239d2554c4da0b7621211642bf3b10650"
Don't tick top-level string literals
This fixes a regression due to D2605 (see #8472) wherein top-level
primitive
strings would fail to be noticed by CoreToStg as they were wrapped in a
tick. This resulted in a panic in CoreToStg due to inconsistent CAF
information
(or a Core Lint failure, if enabled). Here we document the invariant that
unlifted expressions can only sit at top-level if of the form `Lit
(MachStr
...)` with no ticks or other embellishments. Moreover, we fix instance of
this in `Simplify.prepareRhs` and `FloatOut.wrapTick` where this
invariant was being broken.
Test Plan: Validate with `-g`. Run testsuite with `WAY=ghci`.
Reviewers: austin, simonpj
Reviewed By: simonpj
Subscribers: simonpj, akio, scpmw, thomie
Differential Revision: https://phabricator.haskell.org/D3051
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8472#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list