1. 02 Jul, 2013 2 commits
    • ian@well-typed.com's avatar
      Fix build on Win64 · 98810fe8
      ian@well-typed.com authored
      gcc thought that fourthFloating could be used without being defined.
      In actual fact it couldn't, but I've refactored the code so that it
      can now see this.
      98810fe8
    • Simon Marlow's avatar
      Fix #7970, #2161, unfix #551 · 1ae72ac4
      Simon Marlow authored
      Establish the reachability of threads before weak pointers.  Hence a
      deadlocked thread can keep a weak pointer alive and prevent it from
      being finalized early.  However, an reference from the finalizer of a
      weak pointer will no longer prevent a thread from being considered
      deadlocked (#551).  To keep the thread alive in that situation you
      need to use a StablePtr.
      
      See comments on #7970 and in the code for more details.
      1ae72ac4
  2. 28 Jun, 2013 7 commits
  3. 27 Jun, 2013 9 commits
    • Peter Wortmann's avatar
      LLVM refactor cleanups · fe44d053
      Peter Wortmann authored
      Slightly more documentation, removed unused label map (huh),
      removed MonadIO instance on LlvmM to improve encapsulation.
      fe44d053
    • Peter Wortmann's avatar
      Major Llvm refactoring · a948fe83
      Peter Wortmann authored
      This combined patch reworks the LLVM backend in a number of ways:
      
      1. Most prominently, we introduce a LlvmM monad carrying the contents of
         the old LlvmEnv around. This patch completely removes LlvmEnv and
         refactors towards standard library monad combinators wherever possible.
      
      2. Support for streaming - we can now generate chunks of Llvm for Cmm as
         it comes in. This might improve our speed.
      
      3. To allow streaming, we need a more flexible way to handle forward
         references. The solution (getGlobalPtr) unifies LlvmCodeGen.Data
         and getHsFunc as well.
      
      4. Skip alloca-allocation for registers that are actually never written.
         LLVM will automatically eliminate these, but output is smaller and
         friendlier to human eyes this way.
      
      5. We use LlvmM to collect references for llvm.used. This allows places
         other than cmmProcLlvmGens to generate entries.
      a948fe83
    • Peter Wortmann's avatar
      Use full contents size for arrays · fa6cbdfb
      Peter Wortmann authored
      I am not quite sure at what point it makes sense to look at arrays as
      pointers, but I ran into at least one use case that strongly suggested
      doing it this way (calculating the actual size of structures, to be exact).
      fa6cbdfb
    • Peter Wortmann's avatar
      8f0ecc03
    • Peter Wortmann's avatar
      Extend globals to aliases · 720a87c7
      Peter Wortmann authored
      Also give them a proper constructor - getGlobalVar and getGlobalValue
      map directly to the accessors.
      720a87c7
    • Peter Wortmann's avatar
      Use SDoc for all LLVM pretty-printing · 99d39221
      Peter Wortmann authored
      This patch reworks some parts of the LLVM pretty-printing code that were
      still using Show and String. Now we should be using SDoc and Outputable
      throughout. Note that many get*Name functions become pp*Name
      here as a side-effect.
      99d39221
    • Peter Wortmann's avatar
      Iteration on dterei's metadata design · 12148d91
      Peter Wortmann authored
      - MetaArgs is not needed, as variables are already meta data
      
      - Same goes for MetaVal - its only reason for existing seems to be to
        support LLVM's strange pretty-printing for meta-data annotations, and
        I feel that is better to keep the data structure clean and handle it in
        the pretty-printing instead.
      
      - Rename "MetaData" to "MetaAnnot". Meta-data is still meta-data when it
        is not associated with an expression or statement - for example compile
        unit data for debugging. I feel the old name was a bit misleading.
      
      - Make the renamed MetaAnnot a proper data type instead of a type alias
        for a pair.
      
      - Rename "MetaExpr" constructor to "MetaStruct". As the data is much more
        like a LLVM structure (not array, as it can contain values).
      
      - Fix a warning
      12148d91
    • dterei's avatar
      3b1d920e
    • dterei's avatar
      280a7ec6
  4. 25 Jun, 2013 6 commits
  5. 24 Jun, 2013 6 commits
  6. 23 Jun, 2013 2 commits
  7. 22 Jun, 2013 8 commits