Wed Dec  2 22:54:55 PST 2009  Roman Leshchinskiy <[email protected]>
  * Add new ForceSpecConstr annotation
  Ignore-this: ca5327f85d9d40c78d95e8bfe3e7fab1
  
  Annotating a type with {-# ANN type T ForceSpecConstr #-} makes SpecConstr
  ignore -fspec-constr-threshold and -fspec-constr-count for recursive functions
  that have arguments of type T. Such functions will be specialised regardless
  of their size and there is no upper bound on the number of specialisations
  that can be generated. This also works if T is embedded in other types such as
  Maybe T (but not T -> T).
  
  T should not be a product type because it could be eliminated by the
  worker/wrapper transformation. For instance, in
  
  data T = T Int Int
  
  foo :: T -> Int
  foo (T m n) = ... foo (T m' n') ...
  
  SpecConstr will never see the T because w/w will get rid of it. I'm still
  thinking about whether fixing this is worthwhile.

    M ./compiler/specialise/SpecConstr.lhs -12 +36

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20091203065455-b2b0a-0cada94f63ecfd8488f5211da2df6e245f4b8d0f.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to