1. 21 Jan, 2013 1 commit
  2. 18 Jan, 2013 4 commits
  3. 17 Jan, 2013 18 commits
    • ian@well-typed.com's avatar
    • ian@well-typed.com's avatar
    • tibbe's avatar
      If -msse is specified, pass it to the LLVM backend · 571ecdd8
      tibbe authored
      571ecdd8
    • tibbe's avatar
      Clean up -msse flag handling · b7189de7
      tibbe authored
      We know have a single flag that takes a version number, instead of one
      flag per SSE version.
      b7189de7
    • Simon Marlow's avatar
      Hopefully fix breakage on OS X w/ LLVM · 0dcccf0c
      Simon Marlow authored
      Reordering of includes in GC.c broke on OS X because gctKey is
      declared in Task.h and is needed in the storage manager.  This is
      really the wrong place for it anyway, so I've moved the gctKey pieces
      to where they should be.
      0dcccf0c
    • ian@well-typed.com's avatar
      Use pthread_kill on OS X too · 3f90064f
      ian@well-typed.com authored
      Fixes signals004(threaded1,threaded2) on OS X 32.
      3f90064f
    • ian@well-typed.com's avatar
      Expose the prototype for getMonotonicNSec · fd3fd18a
      ian@well-typed.com authored
      Fixes T3807 on OS X 32.
      fd3fd18a
    • Simon Peyton Jones's avatar
    • Simon Marlow's avatar
      Tidy up cross-compiling · 109a1e53
      Simon Marlow authored
      We have two cases:
       1. building a cross-compiler
       2. compiling GHC to run on a foreign platform
      
      These two are done with almost the same setup: (1) is the stage 1
      compiler, and (2) is the stage 2 compiler, when CrossCompiling=YES.
      
      The only difference between (1) and (2) is that you if you set up the
      build for (1), then it stops before stage 2 and you can 'make install'
      to install stage 1.
      
      Unfortunately, (2) didn't work, and the build system code needed some
      tidying up.
      
      Change to the way the build is set up:
      
      Before
      ------
      
      To build a cross-compiler:
        ./configure --target=<..>
      
      To compile a foreign GHC:
        ./configure --host=<..> --target=<..>
      
      Now
      ---
      
      To build a cross-compiler:
        ./configure --target=<..>
        And set "Stage1Only=YES" in mk/build.mk
      
      To compile a foreign GHC:
        ./configure --target=<..>
      109a1e53
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      A simple improvement to CSE · 91b44bc5
      Simon Peyton Jones authored
      See Note [CSE for case expressions].  I don't think this is a big
      deal, but it's nice, and it's easy.
      91b44bc5
    • Simon Peyton Jones's avatar
      Major patch to implement the new Demand Analyser · 0831a12e
      Simon Peyton Jones authored
      This patch is the result of Ilya Sergey's internship at MSR.  It
      constitutes a thorough overhaul and simplification of the demand
      analyser.  It makes a solid foundation on which we can now build.
      Main changes are
      
      * Instead of having one combined type for Demand, a Demand is
         now a pair (JointDmd) of
            - a StrDmd and
            - an AbsDmd.
         This allows strictness and absence to be though about quite
         orthogonally, and greatly reduces brain melt-down.
      
      * Similarly in the DmdResult type, it's a pair of
           - a PureResult (indicating only divergence/non-divergence)
           - a CPRResult (which deals only with the CPR property
      
      * In IdInfo, the
          strictnessInfo field contains a StrictSig, not a Maybe StrictSig
          demandInfo     field contains a Demand, not a Maybe Demand
        We don't need Nothing (to indicate no strictness/demand info)
        any more; topSig/topDmd will do.
      
      * Remove "boxity" analysis entirely.  This was an attempt to
        avoid "reboxing", but it added complexity, is extremely
        ad-hoc, and makes very little difference in practice.
      
      * Remove the "unboxing strategy" computation. This was an an
        attempt to ensure that a worker didn't get zillions of
        arguments by unboxing big tuples.  But in fact removing it
        DRAMATICALLY reduces allocation in an inner loop of the
        I/O library (where the threshold argument-count had been
        set just too low).  It's exceptional to have a zillion arguments
        and I don't think it's worth the complexity, especially since
        it turned out to have a serious performance hit.
      
      * Remove quite a bit of ad-hoc cruft
      
      * Move worthSplittingFun, worthSplittingThunk from WorkWrap to
        Demand. This allows JointDmd to be fully abstract, examined
        only inside Demand.
      
      Everything else really follows from these changes.
      
      All of this is really just refactoring, so we don't expect
      big performance changes, but acutally the numbers look quite
      good.  Here is a full nofib run with some highlights identified:
      
              Program           Size    Allocs   Runtime   Elapsed  TotalMem
      --------------------------------------------------------------------------------
               expert          -2.6%    -15.5%      0.00      0.00     +0.0%
                fluid          -2.4%     -7.1%      0.01      0.01     +0.0%
                   gg          -2.5%    -28.9%      0.02      0.02    -33.3%
            integrate          -2.6%     +3.2%     +2.6%     +2.6%     +0.0%
              mandel2          -2.6%     +4.2%      0.01      0.01     +0.0%
             nucleic2          -2.0%    -16.3%      0.11      0.11     +0.0%
                 para          -2.6%    -20.0%    -11.8%    -11.7%     +0.0%
               parser          -2.5%    -17.9%      0.05      0.05     +0.0%
               prolog          -2.6%    -13.0%      0.00      0.00     +0.0%
               puzzle          -2.6%     +2.2%     +0.8%     +0.8%     +0.0%
              sorting          -2.6%    -35.9%      0.00      0.00     +0.0%
             treejoin          -2.6%    -52.2%     -9.8%     -9.9%     +0.0%
      --------------------------------------------------------------------------------
                  Min          -2.7%    -52.2%    -11.8%    -11.7%    -33.3%
                  Max          -1.8%     +4.2%    +10.5%    +10.5%     +7.7%
       Geometric Mean          -2.5%     -2.8%     -0.4%     -0.5%     -0.4%
      
      Things to note
      
      * Binary sizes are smaller. I don't know why, but it's good.
      
      * Allocation is sometiemes a *lot* smaller. I believe that all the big numbers
        (I checked treejoin, gg, sorting) arise from one place, namely a function
        GHC.IO.Encoding.UTF8.utf8_decode, which is strict in two Buffers both of
        which have several arugments.  Not w/w'ing both arguments (which is what
        we did before) has a big effect.  So the big win in actually somewhat
        accidental, gained by removing the "unboxing strategy" code.
      
      * A couple of benchmarks allocate slightly more.  This turns out
        to be due to reboxing (integrate).  But the biggest increase is
        mandel2, and *that* turned out also to be a somewhat accidental
        loss of CSE, and pointed the way to doing better CSE: see Trac
        #7596.
      
      * Runtimes are never very reliable, but seem to improve very slightly.
      
      All in all, a good piece of work.  Thank you Ilya!
      0831a12e
    • Simon Marlow's avatar
      900e7d25
    • Simon Marlow's avatar
      520dc1d2
    • dterei's avatar
      Output LLVM version in use at -V2. · aef38d13
      dterei authored
      aef38d13
    • dterei's avatar
      25f8d040
    • mad.one@gmail.com's avatar
      Add -f[no-]warn-unsupported-llvm-version. Closes Trac #7579. · 5cca0b44
      mad.one@gmail.com authored
      
      
      This controls whether or not the compiler warns if we're using an LLVM
      version that's too old or too new. It's mostly useful when building the
      compiler knowingly with an unsupported version, so you don't get a lot
      of warnings in the build process.
      
      There's no documentation for this since it's a flag only a few
      developers would care about anyway.
      Signed-off-by: mad.one@gmail.com's avatarAustin Seipp <mad.one@gmail.com>
      5cca0b44
    • mad.one@gmail.com's avatar
      Add a 'quick-llvm' build mode to mk/build.mk. · b05531bd
      mad.one@gmail.com authored
      
      
      Closes Trac #7572.
      Signed-off-by: mad.one@gmail.com's avatarAustin Seipp <mad.one@gmail.com>
      b05531bd
  4. 16 Jan, 2013 5 commits
  5. 15 Jan, 2013 4 commits
  6. 14 Jan, 2013 5 commits
  7. 12 Jan, 2013 2 commits
  8. 11 Jan, 2013 1 commit