Skip to content
Commits on Oct 5, 2006
  1. Teach SpecConstr about Cast committed
    This patch teaches SpecConstr about casts; see Note [SpecConstr for casts]
  2. Float coercions out of lets committed
    Note [Float coercions]
    When we find the binding
    	x = e `cast` co
    we'd like to transform it to
    	x' = e
    	x = x `cast` co		-- A trivial binding
    There's a chance that e will be a constructor application or function, or something
    like that, so moving the coerion to the usage site may well cancel the coersions
    and lead to further optimisation.  Example:
         data family T a :: *
         data instance T Int = T Int
         foo :: Int -> Int -> Int
         foo m n = ...
              x = T m
              go 0 = 0
              go n = case x of { T m -> go (n-m) }
    		-- This case should optimise
  3. Remove unused argument to mkAtomicArgs committed
  4. Comments and layout committed
  5. Remove unused OccInfo (simplification) committed
    The substitution used to carry "fragile" OccInfo to call sites via the
    DoneId constructor of SimplEnv.SimplSR.  This was always a tricky thing 
    to do, and for some time I've been removing the need for it.
    Now at last I think we can nuke it altogether.  Hooray.
    I did a full nonfib run, and got zero perf changes.
  6. Take 2 on the recursive-rule fix committed
    This is another attempt to fix the interaction between recursion and
    RULES.  I just had it wrong before!  Now the significance of the
    flag on IAmALoopBreaker is given in BasicTypes
      | IAmALoopBreaker	-- Used by the occurrence analyser to mark loop-breakers
    			-- in a group of recursive definitions
    	!RulesOnly	-- True <=> This loop breaker mentions the other binders
    			--	    in its recursive group only in its RULES, not
    			--	    in its rhs
    			--  See OccurAnal Note [RulesOnly]
  7. Take advantage of non-rec-ness in occurrence analysis (minor) committed
  8. Spelling in comment committed
  9. Add intersectsUFM committed
Commits on Oct 4, 2006
  1. Comments only committed
  2. Fix comment in RdrName committed
  3. Improve unboxing of strict fields committed
    Note [Recursive unboxing]
    Be careful not to try to unbox this!
    	data T = MkT !T Int
    But it's the *argument* type that matters. This is fine:
    	data S = MkS S !Int
    because Int is non-recursive.
    Before this patch, we were only doing the unboxing if the *parent*
    data type was non-recursive (eg that meant S was not unboxed), but
    that is over-conservative. 
    This showed up with indexed data types (thanks to Roman for finding it)
    because indexed data types are conservatively regarded as always recursive.
  4. Remove redundant dump committed
  5. Trim imports committed
  6. Improve liberate-case to take account of coercions committed
    Note [Scrutinee with cast]
    Consider this:
        f = \ t -> case (v `cast` co) of
    	         V a b -> a : f t
    Exactly the same optimistaion (unrolling one call to f) will work here, 
    despite the cast.  See mk_alt_env in the Case branch of libCase.
    This patch does the job.  For a change, it was really easy.
  7. Remvove totally unused static flags committed
  8. Remove ILX from the GHC altogether (although I left the source file I… committed
    …lxGen in case anyone wants to see it)
  9. -frule-check is not a static flag committed
  10. Tidy tyvar OccNames in TcTyClDecl committed
    We want the universal and existential tyvars of a data constructor to
    have distinct OccNames.  It's confusing if they don't (in error messages,
    for example), and with the current way of generating IfaceSyn, it actally
    generates bogus interface files.  (Which bit Roman.)
    When IfaceSyn is full of Names, this won't matter so much, but it still
    seems cleaner.
    This patch adds a 'tidy' step to the generation of DataCon type 
    variables in TcTyClDecls.tcResultType
  11. Improve pretty printing slightly committed
  12. Second bite at the rules-only idea committed
    This is part 2 of the patch that improved the interaction of RULES and
    recursion.  It's vital that all Ids that may be referred to from later in
    the module are marked 'IAmALoopBreaker' because otherwise we may do
    postInlineUnconditionally, and lose the binding altogether. 
    So I've added a boolean rules-only flag to IAmALoopBreaker.  Now we can
    do inlining for rules-only loop-breakers.
  13. Eliminate case-of-cast committed
    Note [Case of cast]
    Consider 	case (v `cast` co) of x { I# ->
    		... (case (v `cast` co) of {...}) ...
    We'd like to eliminate the inner case.  We can get this neatly by 
    arranging that inside the outer case we add the unfolding
    	v |-> x `cast` (sym co)
    to v.  Then we should inline v at the inner case, cancel the casts, 
    and away we go
    This patch does the job, fixing a performance hole reported by Roman.
Commits on Oct 3, 2006
  1. @igfoo
  2. Make recursion and RULES interact better committed
    See Trac #683
    This patch improves the interaction of recursion and RULES; at least I
    hope it does.   The problem was that a RULE was being treated uniformly like
    an "extra RHS". This worked badly when you have a non-recursive definition
    that is made recursive only by RULE.
    This patch maeks the occurrence analyser know whether a binder is referred to
    only from RULES (the RulesOnly constructor in OccInfo).  Then we can ignore
    such edges when deciding on the order of bindings in a letrec, and when
    setting the LoopBreaker flag.
    The remaining potential problem is this:
    	rec{ f = ...g...
    	   ; g = ...f...
    	     RULE g True = ...
    The RULE for g may not be visible in f's rhs.  This is fixable, but not
  3. Warning police only committed
  4. Fix scoped type variables for expression type signatures committed
    I had forgotten to bring scoped type variables into scope at an expression
    type signature, such as
    	e :: forall s. <type>
    where 's' should scope over the expression e.
    Like everything to do with scoped type variables, fixing this took an 
    unreasonable amount of work.  I'm sure there must be a better way to 
    achitect this!
    I updated the user manual too.
    A test is tc213.
    It would be good to push this into 6.6.1
  5. Trim imports committed
Commits on Sep 21, 2006
  1. Made 'for' a special ID in the grammar. committed
Commits on Sep 20, 2006
  1. Merged stand-alone deriving with FC stuff. committed
Commits on Sep 19, 2006
  1. First documentation on stand-alone instance deriving. committed
  2. Fixed source location and instance origin in stand-alone deriving err… committed
    …or messages.
Commits on Sep 18, 2006
  1. Added type signature for tcSplitSigmaTy. committed
  2. New syntax for stand-alone deriving. Implemented fully. committed
Commits on Sep 17, 2006
  1. Renamer part of stand-alone deriving extension. committed
  2. Added parser and abstract syntax support for stand-alone deriving dec… committed
Something went wrong with that request. Please try again.