1. 17 Jan, 2008 5 commits
    • simonpj@microsoft.com's avatar
      Add -fspec-inline-join-points to SpecConstr · 44d4bf2c
      simonpj@microsoft.com authored
      This patch addresses a problem that Roman found in SpecConstr.  Consider:
      
      foo :: Maybe Int -> Maybe Int -> Int
      foo a b = let j b = foo a b
                 in
                 case b of
                   Nothing -> ...
                   Just n  -> case a of
                                Just m  -> ... j (Just (n+1)) ...
                                Nothing -> ... j (Just (n-1)) ...
      
      We want to make specialised versions for 'foo' for the patterns
      	Nothing  (Just v)
      	(Just a) (Just b)
      
      Two problems, caused by the join point j.  First, j does not
      scrutinise b, so j won't be specialised f for the (Just v) pattern.
      Second, j is defined where the free var 'a' is not evaluated.
      
      Both are solved by brutally inlining j at its call sites.  This risks
      major code bloat, but it's relatively quick to implement.  The flag
      	-fspec-inline-join-points
      causes brutal inlining for a 
      	non-recursive binding
      	of a function
      	whose RHS contains calls
      	of a recursive function
      
      The (experimental) flag is static for now, and I have not even
      documented it properly.
      
      44d4bf2c
    • Clemens Fruhwirth's avatar
      Fix references to Filepath · 448873c0
      Clemens Fruhwirth authored
      448873c0
    • simonpj@microsoft.com's avatar
    • simonpj@microsoft.com's avatar
      Eliminate warnings with -DDEBUG · 1994febd
      simonpj@microsoft.com authored
      1994febd
    • simonpj@microsoft.com's avatar
      Record evaluated-ness information correctly for strict constructors · 8e15cfb6
      simonpj@microsoft.com authored
      The add_evals code in Simplify.simplAlt had bit-rotted.  Example:
      
        data T a = T !a
        data U a = U !a
      
        foo :: T a -> U a
        foo (T x) = U x
      
      Here we should not evaluate x before building the U result, because
      the x argument of T is already evaluated.
      
      Thanks to Roman for finding this.
      
      8e15cfb6
  2. 16 Jan, 2008 8 commits
  3. 10 Jan, 2008 2 commits
  4. 16 Jan, 2008 7 commits
  5. 10 Jan, 2008 2 commits
  6. 31 Dec, 2007 1 commit
  7. 15 Jan, 2008 1 commit
  8. 14 Jan, 2008 2 commits
  9. 15 Jan, 2008 2 commits
  10. 14 Jan, 2008 1 commit
  11. 13 Jan, 2008 9 commits