#5928: INLINABLE fails to specialize in presence of simple wrapper ---------------------------------+------------------------------------------ Reporter: tibbe | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.6.2 Component: Compiler | Version: 7.4.1 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by tibbe):
* status: new => patch Comment: I've added an optional specialize pass after simplifier phases and just before spec-constr. This solves the issue in this ticket. To test compilations times I compiled the unordered-containers package with the new flag off (the default) and on. I see no changes in compilation times: {{{ tibbe@redwood:ghc (always-specialize)$ time cabal install -w /Users/tibbe/src/ghc/inplace/bin/ghc-stage2 unordered-containers --reinstall Resolving dependencies... In order, the following will be installed: unordered-containers-0.2.2.1 (reinstall) Warning: Note that reinstalls are always dangerous. Continuing anyway... Configuring unordered-containers-0.2.2.1... Building unordered-containers-0.2.2.1... Preprocessing library unordered-containers-0.2.2.1... [1 of 8] Compiling Data.HashMap.UnsafeShift ( Data/HashMap/UnsafeShift.hs, dist/build/Data/HashMap/UnsafeShift.o ) [2 of 8] Compiling Data.HashMap.PopCount ( Data/HashMap/PopCount.hs, dist/build/Data/HashMap/PopCount.o ) [3 of 8] Compiling Data.HashMap.Unsafe ( Data/HashMap/Unsafe.hs, dist/build/Data/HashMap/Unsafe.o ) [4 of 8] Compiling Data.HashMap.Array ( Data/HashMap/Array.hs, dist/build/Data/HashMap/Array.o ) [5 of 8] Compiling Data.HashMap.Base ( Data/HashMap/Base.hs, dist/build/Data/HashMap/Base.o ) [6 of 8] Compiling Data.HashMap.Strict ( Data/HashMap/Strict.hs, dist/build/Data/HashMap/Strict.o ) [7 of 8] Compiling Data.HashMap.Lazy ( Data/HashMap/Lazy.hs, dist/build/Data/HashMap/Lazy.o ) [8 of 8] Compiling Data.HashSet ( Data/HashSet.hs, dist/build/Data/HashSet.o ) In-place registering unordered-containers-0.2.2.1... Running Haddock for unordered-containers-0.2.2.1... cabal: Haddock's internal GHC version must match the configured GHC version. The GHC version is 7.7.20120912 but haddock is using GHC version 7.4.1 Installing library in /Users/tibbe/.cabal/lib/unordered-containers-0.2.2.1/ghc-7.7.20120912 Registering unordered-containers-0.2.2.1... Installed unordered-containers-0.2.2.1 real 0m15.150s user 0m14.602s sys 0m0.497s tibbe@redwood:ghc (always-specialize)$ time cabal install -w /Users/tibbe/src/ghc/inplace/bin/ghc-stage2 unordered-containers --ghc- option=-fspecialise-after --reinstall Resolving dependencies... In order, the following will be installed: unordered-containers-0.2.2.1 (reinstall) Warning: Note that reinstalls are always dangerous. Continuing anyway... Configuring unordered-containers-0.2.2.1... Building unordered-containers-0.2.2.1... Preprocessing library unordered-containers-0.2.2.1... [1 of 8] Compiling Data.HashMap.UnsafeShift ( Data/HashMap/UnsafeShift.hs, dist/build/Data/HashMap/UnsafeShift.o ) [2 of 8] Compiling Data.HashMap.PopCount ( Data/HashMap/PopCount.hs, dist/build/Data/HashMap/PopCount.o ) [3 of 8] Compiling Data.HashMap.Unsafe ( Data/HashMap/Unsafe.hs, dist/build/Data/HashMap/Unsafe.o ) [4 of 8] Compiling Data.HashMap.Array ( Data/HashMap/Array.hs, dist/build/Data/HashMap/Array.o ) [5 of 8] Compiling Data.HashMap.Base ( Data/HashMap/Base.hs, dist/build/Data/HashMap/Base.o ) [6 of 8] Compiling Data.HashMap.Strict ( Data/HashMap/Strict.hs, dist/build/Data/HashMap/Strict.o ) [7 of 8] Compiling Data.HashMap.Lazy ( Data/HashMap/Lazy.hs, dist/build/Data/HashMap/Lazy.o ) [8 of 8] Compiling Data.HashSet ( Data/HashSet.hs, dist/build/Data/HashSet.o ) In-place registering unordered-containers-0.2.2.1... Running Haddock for unordered-containers-0.2.2.1... cabal: Haddock's internal GHC version must match the configured GHC version. The GHC version is 7.7.20120912 but haddock is using GHC version 7.4.1 Installing library in /Users/tibbe/.cabal/lib/unordered-containers-0.2.2.1/ghc-7.7.20120912 Registering unordered-containers-0.2.2.1... Installed unordered-containers-0.2.2.1 real 0m15.164s user 0m14.635s sys 0m0.495s }}} No measurable change in this case. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5928#comment:14> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs