
#14211: Compiler is unable to INLINE as well as the programmer can manually -------------------------------------+------------------------------------- Reporter: harendra | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: | StaticArgumentTransformation, | Inlining Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I looked at this issue all of this afternoon and don't feel any closer to understanding what is going on but have some diagnosis. Manually performing SAT makes the program much faster. The SAT pass itself does nothing to the definition when there is an `INLINE` pragma on the definition. Removing the `INLINE` pragma causes SAT is happen but makes the program much slower as it is not inlined. Adding `-fexpose-all- unfoldings` to the defining module again makes the program much faster. I also noticed some interaction with SAT and inline pragmas, obviously the unsatted definition is included as the unfolding when an INLINE pragma is present even if it is a loop-breaker. SAT has the effect of changing a definition from a loop-breaker into an inlinable function but because we only export one unfolding this is then not usable across modules. All very unsatisfactory. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14211#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler