Opened 2 years ago

Closed 22 months ago

Last modified 22 months ago

#6111 closed bug (fixed)

Simple loop performance regression of 7.4.1 relative to 7.0.4

Reported by: mdgabriel Owned by: igloo
Priority: normal Milestone:
Component: Compiler Version: 7.4.1
Keywords: Loop performance regression Cc:
Operating System: Linux Architecture: x86
Type of failure: Runtime performance bug Difficulty: Unknown
Test Case: IntegerConversionRules Blocked By:
Blocking: Related Tickets: #6110

Description

Problem

Severe simple loop performance regression in 7.4.1 relative to 7.0.4:
(Loop GHC 7.4.1)/(Loop GHC 7.0.4) ~ 2.9

System

GNU/Linux 3.2.0-24-generic Ubuntu i386

Compilers

GHC 7.0.4
GHC 7.4.1
GCC 4.6.3 for a baseline

Add.hs

module Main where

import Foreign.Storable (sizeOf)
import System.Environment (getArgs)

main :: IO ()
main = do args <- getArgs
          if length args == 1
            then putAdd (read (head args) :: Int)
            else error "need a count operand"

putAdd :: Int -> IO ()
putAdd cnt = let s = loop 0 cnt (0 :: Double)
                 d = sizeOf (0 :: Double)
             in putStrLn ("Add="++show s++" (sizeOf(Double)="++show d++")")


loop :: (Integral a, Num b) => a -> a -> b -> b
loop i n t = if i < n
             then loop (succ i) n (t + fromIntegral i)
             else t

GHC compilation

ghc --version

7.4.1

ghc -O2 -Wall --make -o add Main.hs


ghc --version

7.0.4

ghc -O2 -Wall --make -o add Main.hs

Baseline cadd.c

#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
  unsigned long i, size;
  double tot=0;

  if (argc != 2)
    {
      (void)fprintf(stderr, "usage: %s size\n", basename(argv[0]));
      return(1);
    }

  size = atol(argv[1]);

  for(i = 0; i < size; i++) tot += (double)i;

  (void)printf("Add=%.15e\n", tot);

  return(0);
}

GCC baseline compilation

gcc --version

4.6.3

gcc -O2 -Wall cadd.c -o cadd

Data: time add-7.0.4 n

n seconds
100000000 0.77
200000000 1.55
300000000 2.33
400000000 3.11
500000000 3.89
600000000 4.66
700000000 5.45
800000000 6.21
900000000 6.99
1000000000 7.77

Data: time add-7.4.1 n

n seconds
100000000 2.26
200000000 4.54
300000000 6.82
400000000 9.08
500000000 11.33
600000000 13.64
700000000 15.91
800000000 18.20
900000000 20.43
1000000000 22.76

Data: time cadd-4.6.3 n

n seconds
100000000 1.04
200000000 2.10
300000000 3.12
400000000 4.19
500000000 5.23
600000000 6.26
700000000 7.32
800000000 8.37
900000000 9.41
1000000000 10.45

Linear in n

y is in seconds

GHC 7.0.4: y = (0.78/108) * n - 0.02
GCC 4.6.3: y = (1.04/10
8) * n + 0.03
GHC 7.4.1: y = (2.28/108) * n - 0.04

Severe performance regression:
GHC 7.4.1/GHC 7.0.4 ~ 2.28/0.78 ~ 2.9

Notes

1/ I discovered the problem in a slightly more complicated case when I recompiled a package that used Data.Vector.Unboxed.

2/ I am impressed that the GHC 7.0.4 is faster than the GCC 4.6.3. I expected it to be close, but not faster. Given this impressive
result, I certainly would hope that the same result can be recovered
once again.

Change History (6)

comment:1 Changed 2 years ago by simonpj

  • Difficulty set to Unknown
  • Owner set to igloo

Seee also #6110

Ian,

The reason for this regression is, I believe, that before we generated:

            Main.$w$sloop
              (GHC.Prim.+# wild1_aPr 1)
              ww1_s1U0
              (GHC.Prim.+## ww2_s1U4 (GHC.Prim.int2Double# wild1_aPr));

but now we generate:

            case GHC.Integer.Type.doubleFromInteger
                   (GHC.Integer.Type.smallInteger wild1_aUP)
            of wild2_aUZ { __DEFAULT ->
            Main.$w$sloop
              (GHC.Prim.+# wild1_aUP 1)
              ww1_s2kW
              (GHC.Prim.+## ww2_s2l0 wild2_aUZ)

So the problem is that we don't have a rule

	doubleFromInteger (smallInteger x) = int2Double# x

The thing is that this isn't an isolated occurrence. Pretty much every function that pattern matches on (S# x) should have a smallInteger rule instead. But there are practically no RULES in GHC.Integer.Type in integer-gmp.

There are a bunch of builtinInteger rules in PrelRules. But nothing for this case. And no comments to explain why they are there.

There is a integer library wiki page
but it does not explain

  • Why lots of things are NOINLINE
  • Why the rules are in PrelRules (to avoid duplication??)

Generally, explaining the thinking would be good.

Could you look at this and, I suppose, add lots of rules?

Many thanks.

comment:2 Changed 2 years ago by simonmar

This is related to #5888, which also demands more rules for Integer.

The reason the rules are all in PrelRules, as I understand it, is because they need to work with Integer constants which are now a Core literal. I agree the design should really be written down somewhere, we did go through a few iterations to arrive at this point and it would be good to record why (I'm sure Ian left some Notes in the code too though).

comment:3 Changed 22 months ago by mdgabriel

Two individuals looking at #6110 have the same or better times with their 7.4.1 compared to their 7.0.4. From my point of view, it appears that the problem in my environment is the coercion from Int to Double. See #6110 for details, but I confirm for a coercion from Int to Int or Int to Int64 in the code above that the problem disappears in my environment.

Did any one compile the example above and confirm that it is slower for their 7.4.1 compared to their 7.04?

comment:4 Changed 22 months ago by igloo@…

commit c7a8941b04541789e60950bb126902effae0ccab

Author: Ian Lynagh <igloo@earth.li>
Date:   Wed Jun 27 21:49:57 2012 +0100

    Add some more Integer rules; fixes #6111

 compiler/basicTypes/Id.lhs        |    2 +-
 compiler/basicTypes/IdInfo.lhs    |    2 +-
 compiler/basicTypes/MkId.lhs-boot |    3 +++
 compiler/prelude/PrelRules.lhs    |   37 ++++++++++++++++++++++++++++++++++++-
 compiler/prelude/PrimOp.lhs-boot  |    7 +++++++
 5 files changed, 48 insertions(+), 3 deletions(-)

comment:5 Changed 22 months ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to IntegerConversionRules

Fixed, and test added.

comment:6 Changed 22 months ago by marlowsd@…

commit 99fd2469fba1a38b2a65b4694f337d92e559df01

Merge: d260d91... 0d19922...
Author: Simon Marlow <marlowsd@gmail.com>
Date:   Wed Jul 4 10:34:48 2012 +0100

    Merge remote-tracking branch 'origin/master' into newcg
    
    * origin/master: (756 commits)
      don't crash if argv[0] == NULL (#7037)
      -package P was loading all versions of P in GHCi (#7030)
      Add a Note, copying text from #2437
      improve the --help docs a bit (#7008)
      Copy Data.HashTable's hashString into our Util module
      Build fix
      Build fixes
      Parse error: suggest brackets and indentation.
      Don't build the ghc DLL on Windows; works around trac #5987
      On Windows, detect if DLLs have too many symbols; trac #5987
      Add some more Integer rules; fixes #6111
      Fix PA dfun construction with silent superclass args
      Add silent superclass parameters to the vectoriser
      Add silent superclass parameters (again)
      Mention Generic1 in the user's guide
      Make the GHC API a little more powerful.
      tweak llvm version warning message
      New version of the patch for #5461.
      Fix Word64ToInteger conversion rule.
      Implemented feature request on reconfigurable pretty-printing in GHCi (#5461)
      ...
    
    Conflicts:
    	compiler/basicTypes/UniqSupply.lhs
    	compiler/cmm/CmmBuildInfoTables.hs
    	compiler/cmm/CmmLint.hs
    	compiler/cmm/CmmOpt.hs
    	compiler/cmm/CmmPipeline.hs
    	compiler/cmm/CmmStackLayout.hs
    	compiler/cmm/MkGraph.hs
    	compiler/cmm/OldPprCmm.hs
    	compiler/codeGen/CodeGen.lhs
    	compiler/codeGen/StgCmm.hs
    	compiler/codeGen/StgCmmBind.hs
    	compiler/codeGen/StgCmmLayout.hs
    	compiler/codeGen/StgCmmUtils.hs
    	compiler/main/CodeOutput.lhs
    	compiler/main/HscMain.hs
    	compiler/nativeGen/AsmCodeGen.lhs
    	compiler/simplStg/SimplStg.lhs

 .authorspellings                                   |   29 -
 .darcs-boring                                      |  256 ---
 .gitignore                                         |    1 +
 README                                             |   11 +-
 aclocal.m4                                         |   96 +-
 bindisttest/Makefile                               |    4 +-
 bindisttest/ghc.mk                                 |    4 +-
 compiler/HsVersions.h                              |   13 +-
 compiler/basicTypes/BasicTypes.lhs                 |   44 +-
 compiler/basicTypes/DataCon.lhs                    |   33 +-
 compiler/basicTypes/Demand.lhs                     |    3 -
 compiler/basicTypes/Id.lhs                         |   21 +-
 compiler/basicTypes/IdInfo.lhs                     |   17 +-
 compiler/basicTypes/Literal.lhs                    |   56 +-
 compiler/basicTypes/MkId.lhs                       |   74 +-
 compiler/basicTypes/MkId.lhs-boot                  |    3 +
 compiler/basicTypes/Name.lhs                       |    5 +-
 compiler/basicTypes/NameEnv.lhs                    |   32 +-
 compiler/basicTypes/OccName.lhs                    |   13 +-
 compiler/basicTypes/RdrName.lhs                    |   46 +-
 compiler/basicTypes/SrcLoc.lhs                     |  279 ++--
 compiler/basicTypes/UniqSupply.lhs                 |    9 +-
 compiler/basicTypes/Unique.lhs                     |   37 +-
 compiler/basicTypes/Var.lhs                        |   40 +-
 compiler/cmm/Bitmap.hs                             |    2 +-
 compiler/cmm/CLabel.hs                             |  117 +-
 compiler/cmm/Cmm.hs                                |   10 +-
 compiler/cmm/CmmBuildInfoTables.hs                 |   38 +-
 compiler/cmm/CmmCvt.hs                             |    2 +-
 compiler/cmm/CmmExpr.hs                            |    4 +
 compiler/cmm/CmmInfo.hs                            |    4 +-
 compiler/cmm/CmmLint.hs                            |   71 +-
 compiler/cmm/CmmMachOp.hs                          |    9 +-
 compiler/cmm/CmmOpt.hs                             |   31 +-
 compiler/cmm/CmmParse.y                            |   10 +-
 compiler/cmm/CmmPipeline.hs                        |   22 +-
 compiler/cmm/CmmProcPoint.hs                       |    2 +-
 compiler/cmm/CmmStackLayout.hs                     |  591 +++++
 compiler/cmm/CmmType.hs                            |    6 +
 compiler/cmm/CmmUtils.hs                           |    7 +-
 compiler/cmm/OldCmm.hs                             |    9 +-
 compiler/cmm/OldCmmLint.hs                         |   70 +-
 compiler/cmm/OldCmmUtils.hs                        |    1 +
 compiler/cmm/OldPprCmm.hs                          |   99 +-
 compiler/cmm/OptimizationFuel.hs                   |    1 +
 compiler/cmm/PprC.hs                               |   76 +-
 compiler/cmm/PprCmm.hs                             |  109 +-
 compiler/cmm/PprCmmDecl.hs                         |   97 +-
 compiler/cmm/PprCmmExpr.hs                         |  117 +-
 compiler/codeGen/CgBindery.lhs                     |   27 +-
 compiler/codeGen/CgCase.lhs                        |    1 -
 compiler/codeGen/CgClosure.lhs                     |   29 +-
 compiler/codeGen/CgCon.lhs                         |   11 +-
 compiler/codeGen/CgExpr.lhs                        |    2 +-
 compiler/codeGen/CgForeignCall.hs                  |    8 +-
 compiler/codeGen/CgInfoTbls.hs                     |    5 +-
 compiler/codeGen/CgMonad.lhs                       |    1 +
 compiler/codeGen/CgParallel.hs                     |   69 +-
 compiler/codeGen/CgPrimOp.hs                       |  186 ++-
 compiler/codeGen/CgProf.hs                         |    3 +-
 compiler/codeGen/CgStackery.lhs                    |    3 +-
 compiler/codeGen/CgTailCall.lhs                    |    1 +
 compiler/codeGen/CgTicky.hs                        |   13 +-
 compiler/codeGen/CgUtils.hs                        |   13 +-
 compiler/codeGen/ClosureInfo.lhs                   |   50 +-
 compiler/codeGen/CodeGen.lhs                       |    3 +-
 compiler/codeGen/StgCmm.hs                         |    5 +-
 compiler/codeGen/StgCmmBind.hs                     |   47 +-
 compiler/codeGen/StgCmmClosure.hs                  |   68 +-
 compiler/codeGen/StgCmmCon.hs                      |    4 +-
 compiler/codeGen/StgCmmEnv.hs                      |    1 -
 compiler/codeGen/StgCmmExpr.hs                     |    2 +-
 compiler/codeGen/StgCmmForeign.hs                  |    7 +-
 compiler/codeGen/StgCmmGran.hs                     |   57 +-
 compiler/codeGen/StgCmmHeap.hs                     |   10 +-
 compiler/codeGen/StgCmmLayout.hs                   |   27 +-
 compiler/codeGen/StgCmmMonad.hs                    |   12 +-
 compiler/codeGen/StgCmmPrim.hs                     |   17 +-
 compiler/codeGen/StgCmmProf.hs                     |    3 +-
 compiler/codeGen/StgCmmTicky.hs                    |   19 +-
 compiler/codeGen/StgCmmUtils.hs                    |   14 +-
 compiler/coreSyn/CoreArity.lhs                     |   10 +-
 compiler/coreSyn/CoreFVs.lhs                       |   20 +-
 compiler/coreSyn/CoreLint.lhs                      |  531 ++---
 compiler/coreSyn/CorePrep.lhs                      |  481 ++--
 compiler/coreSyn/CoreSubst.lhs                     |    5 +-
 compiler/coreSyn/CoreSyn.lhs                       |   92 +-
 compiler/coreSyn/CoreTidy.lhs                      |    4 +-
 compiler/coreSyn/CoreUnfold.lhs                    |  165 +-
 compiler/coreSyn/CoreUtils.lhs                     |  275 ++-
 compiler/coreSyn/MkCore.lhs                        |   54 +-
 compiler/coreSyn/MkExternalCore.lhs                |  199 +-
 compiler/coreSyn/PprCore.lhs                       |  261 ++--
 compiler/coreSyn/TrieMap.lhs                       |  137 +-
 compiler/deSugar/Coverage.lhs                      |  510 +++--
 compiler/deSugar/Desugar.lhs                       |    9 +-
 compiler/deSugar/DsArrows.lhs                      |    4 +-
 compiler/deSugar/DsBinds.lhs                       |  208 ++-
 compiler/deSugar/DsCCall.lhs                       |   13 +-
 compiler/deSugar/DsExpr.lhs                        |   63 +-
 compiler/deSugar/DsForeign.lhs                     |  136 +-
 compiler/deSugar/DsListComp.lhs                    |   50 +-
 compiler/deSugar/DsMeta.hs                         | 1005 +++++----
 compiler/deSugar/DsMonad.lhs                       |   19 +-
 compiler/deSugar/DsUtils.lhs                       |    4 +-
 compiler/deSugar/Match.lhs                         |    2 +-
 compiler/deSugar/MatchCon.lhs                      |   17 +-
 compiler/ghc.cabal.in                              |   42 +-
 compiler/ghc.mk                                    |   28 +-
 compiler/ghci/ByteCodeAsm.lhs                      |  599 +++---
 compiler/ghci/ByteCodeGen.lhs                      |  276 ++-
 compiler/ghci/ByteCodeItbls.lhs                    |   31 +-
 compiler/ghci/ByteCodeLink.lhs                     |   14 +-
 compiler/ghci/Debugger.hs                          |   11 +-
 compiler/ghci/DebuggerUtils.hs                     |    4 +-
 compiler/ghci/LibFFI.hsc                           |    4 +-
 compiler/ghci/Linker.lhs                           |  705 +++---
 compiler/ghci/ObjLink.lhs                          |   41 +-
 compiler/ghci/RtClosureInspect.hs                  |  180 +-
 compiler/hsSyn/Convert.lhs                         |  353 ++--
 compiler/hsSyn/HsBinds.lhs                         |   44 +-
 compiler/hsSyn/HsDecls.lhs                         |  419 ++--
 compiler/hsSyn/HsExpr.lhs                          |   46 +-
 compiler/hsSyn/HsImpExp.lhs                        |   19 +-
 compiler/hsSyn/HsPat.lhs                           |   11 +-
 compiler/hsSyn/HsSyn.lhs                           |    3 +-
 compiler/hsSyn/HsTypes.lhs                         |  406 ++--
 compiler/hsSyn/HsUtils.lhs                         |   94 +-
 compiler/iface/BinIface.hs                         |  169 +-
 compiler/iface/BuildTyCl.lhs                       |   15 +-
 compiler/iface/FlagChecker.hs                      |   46 +-
 compiler/iface/IfaceEnv.lhs                        |   25 +-
 compiler/iface/IfaceSyn.lhs                        |   39 +-
 compiler/iface/IfaceType.lhs                       |  154 +-
 compiler/iface/LoadIface.lhs                       |   15 +-
 compiler/iface/MkIface.lhs                         |  254 ++-
 compiler/iface/TcIface.lhs                         |  198 ++-
 compiler/llvmGen/Llvm.hs                           |    1 -
 compiler/llvmGen/Llvm/PpLlvm.hs                    |  106 +-
 compiler/llvmGen/LlvmCodeGen.hs                    |   41 +-
 compiler/llvmGen/LlvmCodeGen/Base.hs               |   16 +-
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs            |   57 +-
 compiler/llvmGen/LlvmCodeGen/Ppr.hs                |   13 +-
 compiler/main/Annotations.hs                       |  107 +
 compiler/main/Annotations.lhs                      |  108 -
 compiler/main/CmdLineParser.hs                     |    4 +-
 compiler/main/CodeOutput.lhs                       |   13 +-
 compiler/main/Constants.lhs                        |    4 +
 compiler/main/DriverMkDepend.hs                    |   10 +-
 compiler/main/DriverPipeline.hs                    |  106 +-
 compiler/main/DynFlags.hs                          |  412 +++-
 compiler/main/DynFlags.hs-boot                     |   13 +
 compiler/main/DynamicLoading.hs                    |   21 +-
 compiler/main/ErrUtils.lhs                         |  119 +-
 compiler/main/ErrUtils.lhs-boot                    |    1 +
 compiler/main/GHC.hs                               |  192 ++-
 compiler/main/GhcMake.hs                           | 1306 ++++++------
 compiler/main/HeaderInfo.hs                        |   78 +-
 compiler/main/HscMain.hs                           |  325 ++--
 compiler/main/HscStats.hs                          |  160 ++
 compiler/main/HscStats.lhs                         |   12 +-
 compiler/main/HscTypes.lhs                         |  105 +-
 compiler/main/InteractiveEval.hs                   |   99 +-
 compiler/main/PackageConfig.hs                     |   50 +-
 compiler/main/Packages.lhs                         |  437 ++--
 compiler/main/StaticFlagParser.hs                  |   38 +-
 compiler/main/StaticFlags.hs                       |   68 +-
 compiler/main/SysTools.lhs                         |   25 +-
 compiler/main/TidyPgm.lhs                          |  749 ++++---
 compiler/nativeGen/AsmCodeGen.lhs                  |  647 +++---
 compiler/nativeGen/PIC.hs                          |   93 +-
 compiler/nativeGen/PPC/CodeGen.hs                  |   33 +-
 compiler/nativeGen/PPC/Ppr.hs                      |  567 +++---
 compiler/nativeGen/PPC/Regs.hs                     |   14 +-
 compiler/nativeGen/PprBase.hs                      |   17 -
 compiler/nativeGen/RegAlloc/Graph/Main.hs          |  609 +++---
 compiler/nativeGen/RegAlloc/Graph/SpillCost.hs     |   10 +-
 compiler/nativeGen/RegAlloc/Graph/Stats.hs         |   30 +-
 compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs |   56 +-
 compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs     |   14 +-
 compiler/nativeGen/RegAlloc/Linear/Main.hs         |   44 +-
 compiler/nativeGen/RegAlloc/Liveness.hs            |   68 +-
 compiler/nativeGen/SPARC/CodeGen.hs                |  511 ++++-
 compiler/nativeGen/SPARC/CodeGen/CCall.hs          |  343 ---
 compiler/nativeGen/SPARC/CodeGen/CondCode.hs       |    7 +-
 compiler/nativeGen/SPARC/CodeGen/Gen64.hs          |    3 +-
 compiler/nativeGen/SPARC/CodeGen/Sanity.hs         |   10 +-
 compiler/nativeGen/SPARC/Imm.hs                    |    5 +-
 compiler/nativeGen/SPARC/Ppr.hs                    |   94 +-
 compiler/nativeGen/TargetReg.hs                    |   70 +-
 compiler/nativeGen/X86/CodeGen.hs                  |  458 +++--
 compiler/nativeGen/X86/Instr.hs                    |    3 +
 compiler/nativeGen/X86/Ppr.hs                      |  155 +-
 compiler/nativeGen/X86/Regs.hs                     |   43 +-
 compiler/parser/Lexer.x                            |   75 +-
 compiler/parser/Parser.y.pp                        |  143 +-
 compiler/parser/ParserCore.y                       |   34 +-
 compiler/parser/RdrHsSyn.lhs                       |  330 ++--
 compiler/prelude/ForeignCall.lhs                   |   56 +-
 compiler/prelude/PrelNames.lhs                     |  136 +-
 compiler/prelude/PrelRules.lhs                     |  212 ++-
 compiler/prelude/PrimOp.lhs                        |    3 -
 compiler/prelude/PrimOp.lhs-boot                   |    7 +
 compiler/prelude/TysPrim.lhs                       |  114 +-
 compiler/prelude/TysWiredIn.lhs                    |   88 +-
 compiler/prelude/primops.txt.pp                    |   39 +
 compiler/profiling/CostCentre.lhs                  |    6 +-
 compiler/profiling/ProfInit.hs                     |    9 +-
 compiler/profiling/SCCfinal.lhs                    |    1 +
 compiler/rename/RnBinds.lhs                        |   80 +-
 compiler/rename/RnEnv.lhs                          |  470 +++--
 compiler/rename/RnExpr.lhs                         |   80 +-
 compiler/rename/RnHsSyn.lhs                        |  159 --
 compiler/rename/RnNames.lhs                        |  194 +--
 compiler/rename/RnPat.lhs                          |   41 +-
 compiler/rename/RnSource.lhs                       |  563 +++---
 compiler/rename/RnTypes.lhs                        |  652 ++++--
 compiler/simplCore/CSE.lhs                         |   30 +-
 compiler/simplCore/CoreMonad.lhs                   |   61 +-
 compiler/simplCore/FloatIn.lhs                     |   18 +-
 compiler/simplCore/OccurAnal.lhs                   |  116 +-
 compiler/simplCore/SetLevels.lhs                   |   41 +-
 compiler/simplCore/SimplCore.lhs                   |   92 +-
 compiler/simplCore/SimplEnv.lhs                    |    1 +
 compiler/simplCore/SimplMonad.lhs                  |    3 +-
 compiler/simplCore/SimplUtils.lhs                  |  234 +--
 compiler/simplCore/Simplify.lhs                    |  131 +-
 compiler/simplStg/SRT.lhs                          |    4 +-
 compiler/simplStg/SimplStg.lhs                     |   14 +-
 compiler/simplStg/UnariseStg.lhs                   |  167 ++
 compiler/specialise/Rules.lhs                      |  584 +++---
 compiler/specialise/SpecConstr.lhs                 |   13 +-
 compiler/specialise/Specialise.lhs                 | 1070 +++++-----
 compiler/stgSyn/CoreToStg.lhs                      |   41 +-
 compiler/stgSyn/StgLint.lhs                        |   71 +-
 compiler/stgSyn/StgSyn.lhs                         |   48 +-
 compiler/stranal/DmdAnal.lhs                       |   17 +-
 compiler/stranal/WorkWrap.lhs                      |   88 +-
 compiler/stranal/WwLib.lhs                         |   56 +-
 compiler/typecheck/FamInst.lhs                     |   78 +-
 compiler/typecheck/Inst.lhs                        |  104 +-
 compiler/typecheck/TcArrows.lhs                    |    4 +-
 compiler/typecheck/TcBinds.lhs                     |  485 ++---
 compiler/typecheck/TcCanonical.lhs                 | 1384 ++++++-------
 compiler/typecheck/TcClassDcl.lhs                  |  124 +-
 compiler/typecheck/TcDeriv.lhs                     |  292 ++-
 compiler/typecheck/TcEnv.lhs                       |  194 +-
 compiler/typecheck/TcErrors.lhs                    |  388 ++--
 compiler/typecheck/TcEvidence.lhs                  |  159 ++-
 compiler/typecheck/TcExpr.lhs                      |   88 +-
 compiler/typecheck/TcForeign.lhs                   |  104 +-
 compiler/typecheck/TcGenDeriv.lhs                  |   12 +-
 compiler/typecheck/TcGenGenerics.lhs               |  515 ++++-
 compiler/typecheck/TcHsSyn.lhs                     |  184 +-
 compiler/typecheck/TcHsType.lhs                    | 1528 +++++++------
 compiler/typecheck/TcInstDcls.lhs                  |  433 +++--
 compiler/typecheck/TcInteract.lhs                  | 1171 +++++-----
 compiler/typecheck/TcMType.lhs                     |  828 ++++----
 compiler/typecheck/TcMatches.lhs                   |   70 +-
 compiler/typecheck/TcPat.lhs                       |   77 +-
 compiler/typecheck/TcRnDriver.lhs                  |  231 ++-
 compiler/typecheck/TcRnMonad.lhs                   |   80 +-
 compiler/typecheck/TcRnTypes.lhs                   |  326 ++--
 compiler/typecheck/TcRules.lhs                     |  197 ++-
 compiler/typecheck/TcSMonad.lhs                    | 1493 ++++++++------
 compiler/typecheck/TcSimplify.lhs                  | 1115 ++++++----
 compiler/typecheck/TcSplice.lhs                    |  157 +-
 compiler/typecheck/TcSplice.lhs-boot               |    7 +-
 compiler/typecheck/TcTyClsDecls.lhs                |  848 ++++----
 compiler/typecheck/TcTyDecls.lhs                   |   18 +-
 compiler/typecheck/TcType.lhs                      |  131 +-
 compiler/typecheck/TcUnify.lhs                     |  237 +--
 compiler/types/Class.lhs                           |    3 -
 compiler/types/Coercion.lhs                        |   22 +-
 compiler/types/FamInstEnv.lhs                      |   12 +-
 compiler/types/FunDeps.lhs                         |   91 +-
 compiler/types/IParam.lhs                          |   41 -
 compiler/types/IParam.lhs-boot                     |   10 -
 compiler/types/InstEnv.lhs                         |   71 +-
 compiler/types/Kind.lhs                            |  240 +--
 compiler/types/OptCoercion.lhs                     |    1 +
 compiler/types/TyCon.lhs                           |  871 ++++----
 compiler/types/Type.lhs                            |  303 ++--
 compiler/types/TypeRep.lhs                         |  172 +-
 compiler/types/Unify.lhs                           |   59 +-
 compiler/utils/Binary.hs                           |    3 -
 compiler/utils/Digraph.lhs                         |   17 +-
 compiler/utils/Exception.hs                        |    6 +-
 compiler/utils/FastString.lhs                      |    5 -
 compiler/utils/GraphColor.hs                       |  597 +++---
 compiler/utils/GraphOps.hs                         |  923 ++++----
 compiler/utils/ListSetOps.lhs                      |   79 +-
 compiler/utils/MonadUtils.hs                       |   18 -
 compiler/utils/Outputable.lhs                      |  268 +--
 compiler/utils/Outputable.lhs-boot                 |    7 +
 compiler/utils/Panic.lhs                           |  197 ++-
 compiler/utils/Platform.hs                         |   14 +-
 compiler/utils/Pretty.lhs                          |    9 +-
 compiler/utils/UniqFM.lhs                          |    4 +-
 compiler/utils/Util.lhs                            |  211 +-
 compiler/vectorise/Vectorise.hs                    |   21 +-
 compiler/vectorise/Vectorise/Builtins/Base.hs      |    2 +-
 .../vectorise/Vectorise/Builtins/Initialise.hs     |    2 +-
 compiler/vectorise/Vectorise/Convert.hs            |    9 +-
 compiler/vectorise/Vectorise/Env.hs                |    9 +-
 compiler/vectorise/Vectorise/Exp.hs                |  716 +++++--
 .../vectorise/Vectorise/Generic/Description.hs     |    3 +-
 compiler/vectorise/Vectorise/Generic/PADict.hs     |   41 +-
 compiler/vectorise/Vectorise/Generic/PAMethods.hs  |   27 +-
 compiler/vectorise/Vectorise/Generic/PData.hs      |    4 +-
 compiler/vectorise/Vectorise/Monad.hs              |   20 +-
 compiler/vectorise/Vectorise/Monad/Base.hs         |   41 +-
 compiler/vectorise/Vectorise/Monad/Global.hs       |    9 +-
 compiler/vectorise/Vectorise/Monad/InstEnv.hs      |   18 +-
 compiler/vectorise/Vectorise/Type/Classify.hs      |    1 +
 compiler/vectorise/Vectorise/Type/TyConDecl.hs     |   29 +-
 compiler/vectorise/Vectorise/Type/Type.hs          |    1 +
 compiler/vectorise/Vectorise/Utils/Base.hs         |   19 +-
 compiler/vectorise/Vectorise/Utils/PADict.hs       |   74 +-
 config.guess                                       |  482 ++---
 configure.ac                                       |  156 +-
 distrib/compare/compare.hs                         |   23 +-
 docs/coding-style.html                             |   60 +-
 docs/comm/genesis/modules.html                     |    2 +-
 docs/comm/rts-libs/threaded-rts.html               |    2 +-
 docs/ext-core/Makefile                             |    3 -
 docs/ext-core/a4wide.sty                           |   39 -
 docs/ext-core/code.sty                             |   83 -
 docs/ext-core/core.bib                             |  124 -
 docs/ext-core/core.tex                             |  779 -------
 docs/ext-core/ghc.mk                               |   15 -
 docs/index.html.in                                 |   22 +-
 docs/users_guide/bugs.xml                          |   26 +-
 docs/users_guide/external_core.xml                 | 1807 +++++++++++++++
 docs/users_guide/ffi-chap.xml                      |   52 +
 docs/users_guide/flags.xml                         |  103 +-
 docs/users_guide/ghci.xml                          |  119 +-
 docs/users_guide/glasgow_exts.xml                  |  694 ++++--
 docs/users_guide/packages.xml                      |  108 +-
 docs/users_guide/phases.xml                        |   25 +-
 docs/users_guide/runghc.xml                        |    2 +-
 docs/users_guide/runtime_control.xml               |   43 +-
 docs/users_guide/ug-book.xml.in                    |    1 +
 docs/users_guide/ug-ent.xml.in                     |    2 +
 docs/users_guide/using.xml                         | 2354 +++++++++++---------
 docs/vh/vh.xml                                     |  593 +++---
 driver/ghci/ghc.mk                                 |    4 +-
 driver/utils/cwrapper.c                            |    6 +-
 ghc.mk                                             |   39 +-
 ghc/GhciMonad.hs                                   |   48 +-
 ghc/GhciTags.hs                                    |   42 +-
 ghc/InteractiveUI.hs                               |  616 ++++--
 ghc/Main.hs                                        |   19 +-
 ghc/ghc-bin.cabal.in                               |    4 +-
 ghc/ghc.mk                                         |   11 +-
 ghc/hschooks.c                                     |    5 +-
 includes/Cmm.h                                     |    8 +-
 includes/HaskellConstants.hs                       |   12 +-
 includes/MachDeps.h                                |   27 +-
 includes/Rts.h                                     |   26 +-
 includes/RtsAPI.h                                  |    2 +-
 includes/Stg.h                                     |   10 +-
 includes/ghc.mk                                    |   31 +-
 includes/mkDerivedConstants.c                      |   23 +-
 includes/rts/Constants.h                           |   50 +-
 includes/rts/EventLogFormat.h                      |   27 +-
 includes/rts/FileLock.h                            |    6 +-
 includes/rts/Flags.h                               |   12 +-
 includes/rts/Hooks.h                               |    6 +-
 includes/rts/Messages.h                            |   15 +-
 includes/rts/Threads.h                             |    4 +
 includes/rts/Types.h                               |    6 +-
 includes/rts/storage/GC.h                          |    5 +-
 includes/rts/storage/InfoTables.h                  |   22 +-
 includes/rts/storage/TSO.h                         |    2 +-
 includes/stg/DLL.h                                 |   25 +-
 includes/stg/MachRegs.h                            |  209 +-
 includes/stg/MiscClosures.h                        |    2 +
 includes/stg/Types.h                               |   29 +-
 libffi/ghc.mk                                      |   11 +-
 .../Distribution/InstalledPackageInfo/Binary.hs    |    4 +-
 libraries/gen_contents_index                       |   37 +-
 mk/config.mk.in                                    |   21 +-
 mk/tree.mk                                         |    2 +-
 mk/validate-settings.mk                            |   18 +-
 packages                                           |    3 +-
 rts/Adjustor.c                                     |  477 +++--
 rts/Capability.c                                   |   50 +-
 rts/Capability.h                                   |    6 +-
 rts/ClosureFlags.c                                 |   18 +-
 rts/Disassembler.c                                 |   18 +-
 rts/FileLock.c                                     |  144 ++
 rts/FileLock.h                                     |   15 +
 rts/GetTime.h                                      |    3 +
 rts/HeapStackCheck.cmm                             |   12 +-
 rts/Interpreter.c                                  |   48 +-
 rts/Linker.c                                       |  826 +++++++-
 rts/LinkerInternals.h                              |    6 +-
 rts/PosixSource.h                                  |    4 +
 rts/Prelude.h                                      |    8 +-
 rts/PrimOps.cmm                                    |   39 +-
 rts/Printer.c                                      |   26 +-
 rts/ProfHeap.c                                     |    2 +-
 rts/RaiseAsync.c                                   |   77 +-
 rts/RetainerProfile.c                              |    4 +-
 rts/RtsDllMain.c                                   |    4 +-
 rts/RtsDllMain.h                                   |    2 +-
 rts/RtsFlags.c                                     |   20 +-
 rts/RtsMain.c                                      |    7 +-
 rts/RtsProbes.d                                    |   37 +-
 rts/RtsStartup.c                                   |   20 +-
 rts/Schedule.c                                     |   38 +-
 rts/Stats.c                                        |  163 +-
 rts/Stats.h                                        |   19 +-
 rts/StgCRun.c                                      |   87 +-
 rts/StgMiscClosures.cmm                            |    6 +-
 rts/StgStartup.cmm                                 |   12 +-
 rts/Task.c                                         |  104 +-
 rts/Task.h                                         |   30 +-
 rts/Threads.c                                      |   54 +-
 rts/Ticky.c                                        |   26 +-
 rts/Trace.c                                        |  148 ++-
 rts/Trace.h                                        |  263 ++-
 rts/eventlog/EventLog.c                            |  201 ++-
 rts/eventlog/EventLog.h                            |   34 +
 rts/ghc.mk                                         |   23 +-
 rts/hooks/MallocFail.c                             |    2 +-
 rts/hooks/OutOfHeap.c                              |    2 +-
 rts/hooks/StackOverflow.c                          |    2 +-
 rts/package.conf.in                                |    8 +-
 rts/posix/Clock.h                                  |   35 +
 rts/posix/FileLock.c                               |  145 --
 rts/posix/FileLock.h                               |   15 -
 rts/posix/GetTime.c                                |   50 +-
 rts/posix/Itimer.c                                 |   13 +-
 rts/posix/OSMem.c                                  |    2 +-
 rts/posix/OSThreads.c                              |    1 -
 rts/posix/Select.c                                 |   81 +-
 rts/posix/Select.h                                 |    2 +-
 rts/sm/Compact.c                                   |    2 +-
 rts/sm/Evac.c                                      |    2 +-
 rts/sm/GC.c                                        |   25 +-
 rts/sm/Sanity.c                                    |   18 +-
 rts/sm/Scav.c                                      |    6 +-
 rts/sm/Storage.c                                   |  178 +-
 rts/sm/Storage.h                                   |    3 +-
 rts/win32/AwaitEvent.c                             |    4 +-
 rts/win32/GetTime.c                                |   74 +-
 rts/win32/IOManager.c                              |    2 +-
 rts/win32/OSMem.c                                  |   20 +-
 rts/win32/ThrIOManager.c                           |    6 +-
 rts/win32/libHSbase.def                            |    1 -
 rts/win32/libHSghc-prim.def                        |    1 +
 rts/win32/seh_excn.c                               |    5 +-
 rules/build-package-data.mk                        |    8 +-
 rules/build-package-way.mk                         |   15 +-
 rules/build-package.mk                             |    2 +-
 rules/build-prog.mk                                |    4 +-
 rules/c-suffix-rules.mk                            |   22 +-
 rules/cmm-suffix-rules.mk                          |   12 +-
 rules/distdir-way-opts.mk                          |   46 +-
 rules/hs-suffix-rules-srcdir.mk                    |   30 +-
 rules/hs-suffix-rules.mk                           |    8 +-
 rules/package-config.mk                            |   15 +-
 rules/pretty_commands.mk                           |   13 +
 sync-all                                           |   63 +
 utils/compare_sizes/Main.hs                        |    1 -
 utils/fingerprint/fingerprint.py                   |    2 +-
 utils/genapply/GenApply.hs                         |  650 +++---
 utils/genprimopcode/Main.hs                        |  433 ++--
 utils/genprimopcode/Parser.y                       |    1 -
 utils/genprimopcode/ParserM.hs                     |    1 -
 utils/genprimopcode/Syntax.hs                      |   20 +-
 utils/ghc-cabal/Main.hs                            |   44 +-
 utils/ghc-cabal/ghc.mk                             |    4 +-
 utils/ghc-pkg/Main.hs                              |  108 +-
 utils/ghc-pkg/ghc-pkg.wrapper                      |    2 +-
 utils/ghc-pkg/ghc.mk                               |    8 +-
 utils/ghctags/Main.hs                              |   16 +-
 utils/hp2ps/Key.c                                  |   23 +-
 utils/runghc/ghc.mk                                |    3 +
 utils/runghc/runghc.hs                             |   12 +-
 validate                                           |   27 +-
 483 files changed, 33989 insertions(+), 25880 deletions(-)
Note: See TracTickets for help on using tickets.