[GHC] #13694: CSE runs before SpecConstr
GHC
ghc-devs at haskell.org
Sat May 13 23:47:41 UTC 2017
#13694: CSE runs before SpecConstr
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: SpecConstr, | Operating System: Unknown/Multiple
cse |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
SpecConstr can lead to more CSE opportunities. Currently CSE is run only
once after the full laziness transformation but then not again later in
the pipeline. Running it again after the final clean-up simplification
might lead to smaller programs.
One example with `-fspec-constr-keen`.
{{{
module Foo where
main :: [Int]
main = drop 1 [1,2]
mainMODULE :: [Int]
mainMODULE = mydrop 1 [1,2]
mydrop :: Int -> [a] -> [a]
mydrop 0 xs = xs
mydrop n (x:xs) = mydrop (n-1) xs
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13694>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list