[GHC] #12979: -fspecialise-aggressively is not documented
#12979: -fspecialise-aggressively is not documented -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I couldn't find any documentation for `-fspecialise-aggressively`. The flag is explained in `compiler/specialise/Specialise` in the note `[Specialise imported INLINABLE things]` but doesn't appear in the user manual! The flag was introduced in b9e49d3e9580e13d89efd1f779cb76f610e0d6e0. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12979> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12979: -fspecialise-aggressively is not documented -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): It's entirely experimental; I was just trying something out, and didn't mean to advertise it. But by all means add a user-manual entry -- thanks! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12979#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12979: -fspecialise-aggressively is not documented -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I'm unsure what kind of code it is meant to specialise better. The ticket linked in the comment (#8874) is irrelevant. Is it meant to specialise functions which are polymorphic but but not overloaded? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12979#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12979: -fspecialise-aggressively is not documented -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by danharaj): The relevant documentation seems to be: {{{ Note [Specialise imported INLINABLE things] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What imported functions do we specialise? The basic set is * DFuns and things with INLINABLE pragmas. but with -fspecialise-aggressively we add * Anything with an unfolding template Trac #8874 has a good example of why we want to auto-specialise DFuns. We have the -fspecialise-aggressively flag (usually off), because we risk lots of orphan modules from over-vigorous specialisation. However it's not a big deal: anything non-recursive with an unfolding-template will probably have been inlined already. }}} I have experimented with using this flag too, but it didn't do much for my use case beyond `-fexpose-all-unfoldings` and generous use of `INLINABLE`. As I understand it, instead I could use `-fexpose-all-unfoldings` and `-fspecialise-aggressively` and need not worry about putting `INLINABLE` annotations on my declarations. Is that correct? By the way, it is really brutal on compilation times! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12979#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12979: -fspecialise-aggressively is not documented -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): Yes that is right Dan. Is the compilation time much worse than marking all your definitions as `INLINABLE`? I can't see what it would do more than that would. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12979#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12979: -fspecialise-aggressively is not documented -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"a8c81f3c102988e0f4216b7cb5fec7958e60b4e4/ghc" a8c81f3/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="a8c81f3c102988e0f4216b7cb5fec7958e60b4e4" Document -fspecialise-aggressively Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3007 GHC Trac Issues: #12979 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12979#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12979: -fspecialise-aggressively is not documented -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12979#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC