1. 12 Dec, 2011 1 commit
  2. 09 Dec, 2011 4 commits
  3. 08 Dec, 2011 2 commits
    • PHO's avatar
      Resurrect UseLibFFIForAdjustors from bitrot. · 616b6697
      PHO authored
      * Pass -Irts/dist/build to the C preprocessor to expose libffi headers (ffi.h and ffitarget.h) to foreign import wrappers during the building process of GHC itself.
      * Install libffi headers into $(ghcheaderdir) just like any other C headers. Otherwise an installed GHC can't find them when it wants to compile foreign import wrappers.
      * Include libffi headers in the bindist for the same reason.
      616b6697
    • PHO's avatar
      Detect cases where as(1) doesn't recognise .ident directive (#5408) · 3640d374
      PHO authored
      .ident directives are usually ignored by as(1), and in some cases (like Darwin/PPC) they even raise an error.
      3640d374
  4. 07 Dec, 2011 5 commits
    • Simon Marlow's avatar
      8b48562e
    • Simon Marlow's avatar
      Improve optimisation in the presence of SCCs (fixes #5363) · eea40328
      Simon Marlow authored
      We had some special cases to handle things like
      
        case (scc c (case E of alts)) of alts'
      
      but it only worked when there was a single scc in the way.  This
      generalises the optimisation to handle multiple sccs and ticks, so
      that we can catch most case-of-case optimisations that would normally
      apply in the absence of profiling.
      
      This fixes the example in #5363, and nofib results (with -prof
      -fprof-auto) show that allocation universally goes down or stays the
      same.
      eea40328
    • Simon Marlow's avatar
      Take into account -fprof-auto-* · c4fb520e
      Simon Marlow authored
      c4fb520e
    • chak@cse.unsw.edu.au.'s avatar
      Add new primtypes 'ArrayArray#' and 'MutableArrayArray#' · 021a0dd2
      chak@cse.unsw.edu.au. authored
      The primitive array types, such as 'ByteArray#', have kind #, but are represented by pointers. They are boxed, but unpointed types (i.e., they cannot be 'undefined').
      
      The two categories of array types —[Mutable]Array# and [Mutable]ByteArray#— are containers for unboxed (and unpointed) as well as for boxed and pointed types.  So far, we lacked support for containers for boxed, unpointed types (i.e., containers for the primitive arrays themselves).  This is what the new primtypes provide.
      
      Containers for boxed, unpointed types are crucial for the efficient implementation of scattered nested arrays, which are central to the new DPH backend library dph-lifted-vseg.  Without such containers, we cannot eliminate all unboxing from the inner loops of traversals processing scattered nested arrays.
      021a0dd2
    • Ian Lynagh's avatar
      Improve the space usage of checkremove · 782d2203
      Ian Lynagh authored
      Some of the nightly builders have been running out of memory when
      running it.
      782d2203
  5. 06 Dec, 2011 5 commits
    • Simon Marlow's avatar
      Allow the number of capabilities to be increased at runtime (#3729) · 92e7d6c9
      Simon Marlow authored
      At present the number of capabilities can only be *increased*, not
      decreased.  The latter presents a few more challenges!
      92e7d6c9
    • Simon Marlow's avatar
      Make forkProcess work with +RTS -N · 8b75acd3
      Simon Marlow authored
      Consider this experimental for the time being.  There are a lot of
      things that could go wrong, but I've verified that at least it works
      on the test cases we have.
      
      I also did some API cleanups while I was here.  Previously we had:
      
      Capability * rts_eval (Capability *cap, HaskellObj p, /*out*/HaskellObj *ret);
      
      but this API is particularly error-prone: if you forget to discard the
      Capability * you passed in and use the return value instead, then
      you're in for subtle bugs with +RTS -N later on.  So I changed all
      these functions to this form:
      
      void rts_eval (/* inout */ Capability **cap,
                     /* in    */ HaskellObj p,
                     /* out */   HaskellObj *ret)
      
      It's much harder to use this version incorrectly, because you have to
      pass the Capability in by reference.
      8b75acd3
    • benl's avatar
      Fix #5658: mark all array indexing primops as can_fail · 657773c8
      benl authored
      If they're not marked as can_fail, then they are floated out of case expressions that check whether the indices are in-bounds, causing immense suffering.
      657773c8
    • Peter Wortmann's avatar
      Code generation: Always ask for result of newSpark · 237159c2
      Peter Wortmann authored
      
      
      Otherwise the LLVM backend gets confused over whether its type should be
      "void (i8*, i8*)" or "i64 (i8*, i8*)".
      Signed-off-by: dterei's avatarDavid Terei <davidterei@gmail.com>
      237159c2
    • dterei's avatar
      Fix trac # 5486 · fe60dd4a
      dterei authored
      LLVM has a problem when the user imports some FFI types
      like memcpy and memset in a manner that conflicts with
      the types that GHC uses internally.
      
      So now we pre-initialise the environment with the most
      general types for these functions.
      fe60dd4a
  6. 05 Dec, 2011 5 commits
  7. 04 Dec, 2011 9 commits
  8. 03 Dec, 2011 1 commit
  9. 02 Dec, 2011 8 commits
    • Ian Lynagh's avatar
      4fb39037
    • Ian Lynagh's avatar
      9fd5a2ca
    • Ian Lynagh's avatar
      Fix header installation · 11a614ff
      Ian Lynagh authored
      11a614ff
    • Ian Lynagh's avatar
      MAKE_RESTARTS should never be higher than 1 · 1c400aa9
      Ian Lynagh authored
      1c400aa9
    • Ian Lynagh's avatar
      Move includes/DerivedConstants.h and includes/GHCConstants.h into dist dirs · e8723129
      Ian Lynagh authored
      When they existed, they were getting included in the includes_H_FILES
      variable (as it uses wildcard to find all header files). But the
      .depends files for the programs that generate the headers depend on
      $(includes_H_FILES), so the .depends files looked out-of-date once the
      headers had been created. This caused unnecessary make reinvocations.
      
      So now we put them in dist* directories, where they ought to be anyway.
      e8723129
    • Ian Lynagh's avatar
      Use touchy rather than touch when building on Windows · 2694bb74
      Ian Lynagh authored
      With Windows 7 in a vitrual box VM on OS X, some very odd things happen
      with dates and time stamps when SSHing into cygwin. e.g. here the
      "Change" time is in the past:
      
      $ date; touch foo; stat foo
      Fri Dec  2 16:58:07 GMTST 2011
        File: `foo'
        Size: 0               Blocks: 0          IO Block: 65536  regular
      empty file
      Device: 540aba0bh/1409989131d   Inode: 562949953592977  Links: 1
      Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: (  513/    None)
      Access: 2011-12-02 16:58:07.414457900 +0000
      Modify: 2011-12-02 16:58:07.414457900 +0000
      Change: 2011-12-02 16:58:03.495141800 +0000
       Birth: 2011-12-02 16:57:57.731469900 +0000
      
      And if we copy such a file, then the copy is older (as determined by the
      "Modify" time) than the original:
      
      $ date; touch foo; stat foo; cp foo bar; stat bar
      Fri Dec  2 16:59:10 GMTST 2011
        File: `foo'
        Size: 0               Blocks: 0          IO Block: 65536  regular
      empty file
      Device: 540aba0bh/1409989131d   Inode: 1407374883725128  Links: 1
      Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: (  513/    None)
      Access: 2011-12-02 16:59:10.118457900 +0000
      Modify: 2011-12-02 16:59:10.118457900 +0000
      Change: 2011-12-02 16:59:06.189477700 +0000
       Birth: 2011-12-02 16:57:57.731469900 +0000
        File: `bar'
        Size: 0               Blocks: 0          IO Block: 65536  regular
      empty file
      Device: 540aba0bh/1409989131d   Inode: 281474976882512  Links: 1
      Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: (  513/    None)
      Access: 2011-12-02 16:59:06.394555800 +0000
      Modify: 2011-12-02 16:59:06.394555800 +0000
      Change: 2011-12-02 16:59:06.395532400 +0000
       Birth: 2011-12-02 16:58:40.921899600 +0000
      
      This means that make thinks that things are out of date when it
      shouldn't, so reinvokes itself repeatedly until the MAKE_RESTARTS
      infinite-recursion test triggers.
      
      The touchy program, like most other programs, creates files with both
      Modify and Change in the past, which is still a little odd, but is
      consistent, so doesn't break make.
      2694bb74
    • Simon Marlow's avatar
      More changes aimed at improving call stacks. · 1469f1eb
      Simon Marlow authored
        - Attach a SrcSpan to every CostCentre.  This had the side effect
          that CostCentres that used to be merged because they had the same
          name are now considered distinct; so I had to add a Unique to
          CostCentre to give them distinct object-code symbols.
      
        - New flag: -fprof-auto-calls.  This flag adds an automatic SCC to
          every call site (application, to be precise).  This is typically
          more useful for call stacks than annotating whole functions.
      
      Various tidy-ups at the same time: removed unused NoCostCentre
      constructor, and refactored a bit in Coverage.lhs.
      
      The call stack we get from traceStack now looks like this:
      
      Stack trace:
        Main.CAF (<entire-module>)
        Main.main.xs (callstack002.hs:18:12-24)
        Main.map (callstack002.hs:13:12-16)
        Main.map.go (callstack002.hs:15:21-34)
        Main.map.go (callstack002.hs:15:21-23)
        Main.f (callstack002.hs:10:7-43)
      1469f1eb
    • Simon Marlow's avatar
      remove unused coreExprCc · 6f4bde14
      Simon Marlow authored
      6f4bde14