1. 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
  2. 25 Jun, 2013 6 commits
  3. 24 Jun, 2013 6 commits
  4. 23 Jun, 2013 2 commits
  5. 22 Jun, 2013 14 commits
  6. 21 Jun, 2013 3 commits
    • eir@cis.upenn.edu's avatar
      Revise implementation of overlapping type family instances. · 569b2652
      eir@cis.upenn.edu authored
      This commit changes the syntax and story around overlapping type
      family instances. Before, we had "unbranched" instances and
      "branched" instances. Now, we have closed type families and
      open ones.
      
      The behavior of open families is completely unchanged. In particular,
      coincident overlap of open type family instances still works, despite
      emails to the contrary.
      
      A closed type family is declared like this:
      > type family F a where
      >   F Int = Bool
      >   F a   = Char
      The equations are tried in order, from top to bottom, subject to
      certain constraints, as described in the user manual. It is not
      allowed to declare an instance of a closed family.
      569b2652
    • Gabor Greif's avatar
      Typo in note · 11db9cf8
      Gabor Greif authored
      11db9cf8
    • thoughtpolice's avatar
      Ensure gc_type is StgWord8. · 37e3f3ff
      thoughtpolice authored
      Again, the range of gc_type is actually 1-3, which is technically
      outside the range of rtsBool.
      Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
      37e3f3ff