On 3/22/12 5:09 PM, Johan Tibell wrote:
It'd be nice if we could get foo to specialize on its input arguments,
without having to mark all of fooWith as INLINE.
+1 million. I don't recall how many times I've wanted this optimization,
even if it has to be specified manually. Unfortunately, I rec
: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-
| users-boun...@haskell.org] On Behalf Of John Meacham
| Sent: 22 March 2012 23:16
| To: Johan Tibell
| Cc: glasgow-haskell-users
| Subject: Re: Stealing ideas from the latest GCC release
|
| I support a form of this in jhc by
On Thu, Mar 22, 2012 at 3:52 PM, Jan-Willem Maessen
wrote:
> Wait, I thought this is essentially what constructor specialization does? I
> suppose we might then keep around the old body. Or will these behave
> differently in the presence of, say, different constant Int arguments?
We do want to
I support a form of this in jhc by allowing specialization of values,
not just types.
It is actually the same mechanism as type specialization since that is
just value specialization where the value being specialized on is the
type parameter.
foo :: Bool -> Int
{-# SPECIALIZE foo True :: Int #-}
On Thu, Mar 22, 2012 at 5:09 PM, Johan Tibell wrote:
> Hi all,
>
> While looking at the GCC 4.7 [1] release notes I saw something that's
> perhaps worth stealing. Taken from the release notes:
>
>The inter-procedural constant propagation pass has been rewritten. It
>now performs generic fu
Hi all,
While looking at the GCC 4.7 [1] release notes I saw something that's
perhaps worth stealing. Taken from the release notes:
The inter-procedural constant propagation pass has been rewritten. It
now performs generic function specialization. For example when
compiling the follow