1. 28 Oct, 2010 1 commit
  2. 27 Oct, 2010 7 commits
    • simonpj@microsoft.com's avatar
      Two signficant changes to the simplifier · f95a9542
      simonpj@microsoft.com authored
      1. Do eta-expansion at let-bindings, not lambdas.
         I have wanted to do this for a long time.
         See Note [Eta-expanding at let bindings] in SimplUtils
      
      2. Simplify the rather subtle way in which InlineRules (the
         template captured by an INLINE pragma) was simplified.
         Now, these templates are always simplified in "gentle"
         mode only, and only INLINE things inline inside them.
      
         See Note Note [Gentle mode], Note [Inlining in gentle mode]
         and Note [RULEs enabled in SimplGently] in SimplUtils
      f95a9542
    • simonpj@microsoft.com's avatar
      Yet another go at CoreArity · 32bb9e87
      simonpj@microsoft.com authored
      Amazingly, there were still Wrong Things in the arity analysis, 
      exposed by my fiddling with eta expansion.
      
      I simplified the code, clarified the comments, added more examples,
      and tidied it all up.  I hope it's better this time.
      32bb9e87
    • simonpj@microsoft.com's avatar
      Buglet in tcIface, now that nested binders can have pragmas · 6104e5eb
      simonpj@microsoft.com authored
      This fix ties the knot for recursive groups properly
      6104e5eb
    • simonpj@microsoft.com's avatar
      Add strictness for raiseIO# primop · 42fe1649
      simonpj@microsoft.com authored
      42fe1649
    • simonpj@microsoft.com's avatar
      Don't worker-wrapper INLINABLE things · 51367fba
      simonpj@microsoft.com authored
      See Note [Don't w/w INLINABLE things] in WorkWrap
      
      This fixes a bug that Milan found.
      51367fba
    • Simon Marlow's avatar
      Refactoring and tidyup of HscMain and related things (also fix #1666) · 94bf0d36
      Simon Marlow authored
      While trying to fix #1666 (-Werror aborts too early) I decided to some
      tidyup in GHC/DriverPipeline/HscMain.
      
       - The GhcMonad overloading is gone from DriverPipeline and HscMain
         now.  GhcMonad is now defined in a module of its own, and only
         used in the top-level GHC layer.  DriverPipeline and HscMain
         use the plain IO monad and take HscEnv as an argument.
      
       - WarnLogMonad is gone.  printExceptionAndWarnings is now called
         printException (the old name is deprecated).  Session no longer
         contains warnings.
      
       - HscMain has its own little monad that collects warnings, and also
         plumbs HscEnv around.  The idea here is that warnings are collected
         while we're in HscMain, but on exit from HscMain (any function) we
         check for warnings and either print them (via log_action, so IDEs
         can still override the printing), or turn them into an error if
         -Werror is on.
      
       - GhcApiCallbacks is gone, along with GHC.loadWithLogger.  Thomas
         Schilling told me he wasn't using these, and I don't see a good
         reason to have them.
      
       - there's a new pure API to the parser (suggestion from Neil Mitchell):
            parser :: String
                   -> DynFlags
                   -> FilePath
                   -> Either ErrorMessages (WarningMessages, 
                                            Located (HsModule RdrName))
      94bf0d36
    • Simon Marlow's avatar
      follow changes in the GHC API · 2493b180
      Simon Marlow authored
      2493b180
  3. 13 Oct, 2010 2 commits
  4. 27 Oct, 2010 1 commit
  5. 26 Oct, 2010 1 commit
  6. 21 Oct, 2010 1 commit
  7. 24 Oct, 2010 1 commit
  8. 26 Oct, 2010 5 commits
    • gwright@antiope.com's avatar
      Fix for #4318 (Linker failure on OS X 10.6) · 73dd6e84
      gwright@antiope.com authored
      This patch fixes two bugs in the Mach-O linker and adds debugging statements
      to the same. The bugs:
      
      1. The test for symbol->n_value == 0 is removed and replaced by a test of the
      flag field.  Checking the n_value field was just wrong; the value of a
      symbol should only be examined when allocating space for a common block,
      in which case the n_value field gives the size of the block.  This bug
      led to an infrequently occuring linker crash.
      
      I believe the behavior of the linker now agrees with the intent of the
      sketchy Apple documentation.
      
      2. Jump islands were being filled with garbage instead of the the location
      of the referenced symbol. This caused relocations of type X86_64_RELOC_GOT and
      X86_64_RELOC_GOT_LOAD to eventually lead to crashes.  The fix is simply to
      look up the symbol.
      
      Enough debug statements have been added to follow the operation of the Mach-O
      linker while it loads modules.  They are not yet as informative and well
      organized as for ELF.  Improving the debug statements will require some
      reorganization of the code -- the Mach-O linker seems basically sound, but
      is crying out for some refactoring and commenting.
          
      73dd6e84
    • Ian Lynagh's avatar
      Use removeDups to find top-level duplicate names · 116134b1
      Ian Lynagh authored
      findDupsEq is quadratic, whereas removeDups is n log n.
      Fixes T1969 regression.
      116134b1
    • Ian Lynagh's avatar
      Remove unnecessary imports · 8c550ede
      Ian Lynagh authored
      8c550ede
    • Ian Lynagh's avatar
    • simonpj@microsoft.com's avatar
      Fix a long-standing bug the float-out pass · b284d370
      simonpj@microsoft.com authored
      We were failing to float out a binding that could be floated,
      because of a confusion in the Lam case of floatExpr.
      
      In investigating this I also discoverd that there is really
      no point at all in giving a different level to variables in
      a binding group, so I've now given them all the same (in 
      SetLevels.lvlLamBndrs
      
      The overall difference is quite minor in a nofib run:
      
              Program           Size    Allocs   Runtime   Elapsed
      -------------------------------------------------------------
                  Min          +0.0%     -8.5%    -28.4%    -28.7%
                  Max          +0.0%     +0.7%     -0.7%     -1.1%
       Geometric Mean          +0.0%     -0.0%    -11.6%    -11.8%
      
      I don't trust those runtimes, but smaller is good!  The 8.5% 
      improvement in allocation in fulsom, and seems real.  The 
      0.7% allocation increase only happens in programs with
      very small allocation.  I tracked one down to a call of this form
      
        GHC.IO.Handle.Internals.mkDuplexHandle5
          = \ args -> GHC.IO.Handle.Internals.openTextEncoding1
                        mb_codec ha_type
                        (\mb_encoder mb_decoder -> blah)
      
      With the new floater the argument of openTextEncoding1 becomes
      
           (let lvl = .. in \mb_encoder mb_decoder -> blah)
      
      And rightly so.  However in fact this argument is a continuation
      and hence is called once, so the floating is fruitless.
      
      Roll on one-shot-function analysis (which I know how to do
      but fail to get to!).
      b284d370
  9. 31 Aug, 2010 1 commit
  10. 26 Oct, 2010 3 commits
  11. 25 Oct, 2010 5 commits
  12. 24 Oct, 2010 1 commit
  13. 17 Oct, 2010 1 commit
  14. 23 Oct, 2010 5 commits
  15. 22 Oct, 2010 5 commits