1. 30 Jul, 2008 1 commit
  2. 22 Jul, 2008 1 commit
  3. 29 May, 2008 2 commits
    • dias@eecs.harvard.edu's avatar
      Replacing copyins and copyouts with data-movement instructions · 0d80489c
      dias@eecs.harvard.edu authored
      o Moved BlockId stuff to a new file to avoid module recursion
      o Defined stack areas for parameter-passing locations and spill slots
      o Part way through replacing copy in and copy out nodes
        - added movement instructions for stack pointer
        - added movement instructions for call and return parameters
          (but not with the proper calling conventions)
      o Inserting spills and reloads for proc points is now procpoint-aware
        (it was relying on the presence of a CopyIn node as a proxy for
         procpoint knowledge)
      o Changed ZipDataflow to expect AGraphs (instead of being polymorphic in
         the type of graph)
    • dias@eecs.harvard.edu's avatar
      Cmm back end upgrades · 25628e27
      dias@eecs.harvard.edu authored
      Several changes in this patch, partially bug fixes, partially new code:
      o bug fixes in ZipDataflow
         - added some checks to verify that facts converge
         - removed some erroneous checks of convergence on entry nodes
         - added some missing applications of transfer functions
      o changed dataflow clients to use ZipDataflow, making ZipDataflow0 obsolete
      o eliminated DFA monad (no need for separate analysis and rewriting monads with ZipDataflow)
      o started stack layout changes
         - no longer generating CopyIn and CopyOut nodes (not yet fully expunged though)
         - still not using proper calling conventions
      o simple new optimizations:
         - common block elimination
            -- have not yet tried to move the Adams opt out of CmmProcPointZ
         - block concatenation
      o piped optimization fuel up to the HscEnv
         - can be limited by a command-line flag
         - not tested, and probably not yet properly used by clients
      o added unique supply to FuelMonad, also lifted unique supply to DFMonad
  4. 03 May, 2008 2 commits
  5. 12 Apr, 2008 1 commit
  6. 29 Mar, 2008 1 commit
  7. 07 Feb, 2008 2 commits
    • Duncan Coutts's avatar
      Make more arch-specific #if's exclusive with #else #error cases · 1529e92a
      Duncan Coutts authored
      So when the next person compiles the Sparc NCG it should fail more
      obviously at compile time rather than panicing at runtime.
      Plus one obvious fix for LocalReg gaining an extra param
      Missing bits of Sparc NCG:
        * genSwitch for generating jump tables. This is the most tricky one.
          finding and verifying the values. The nearby comment describes how.
        * isRegRegMove and mkRegRegMoveInstr. Sparc uses Or for int move, check
          what this is supposed to do for single and double float types.
        * regDotColor. Probably just copy the ppc impl.
    • Simon Marlow's avatar
      remove a bogus assertion · a411ca6b
      Simon Marlow authored
  8. 13 Jan, 2008 1 commit
  9. 04 Jan, 2008 1 commit
  10. 03 Dec, 2007 1 commit
  11. 21 Sep, 2007 1 commit
  12. 12 Sep, 2007 1 commit
    • Clemens Fruhwirth's avatar
      Sign extension hack to work around PC64 relocation limitation for binutils <2.17 for x86_64. · b8a64b8e
      Clemens Fruhwirth authored
      binutils <2.17 can't generate PC64 relocations for x86_64. Hence we
      emit only 32 bit PC relative offsets, and artifically stick a zero in
      front of them to make them 64 bit (see PprMach.sh ppr_item in
      pprDataItem). This works as long as the offset is <32bit AND it's
      positive. This is not the case for offsets in jump tables, they are
      all negative. This hack sign extends them with a MOVSXL instruction
      into the dead index register, then adding the properly sign extended
      offset to the jump table base label giving the correct target address
      for the following jump.
  13. 07 Sep, 2007 1 commit
    • nr@eecs.harvard.edu's avatar
      a good deal of salutory renaming · fd8d0411
      nr@eecs.harvard.edu authored
      I've renamed a number of type and data constructors within Cmm so that
      the names used in the compiler may more closely reflect the C--
      specification 2.1.  I've done a bit of other renaming as well.
        CmmFormal and CmmActual now bear a CmmKind (which for now is a
                                                    MachHint as before)
        CmmFormals = [CmmFormal] and CmmActuals = [CmmActual]
        suitable changes have been made to both code and nonterminals in the
        Cmm parser (which is as yet untested)
        For reasons I don't understand, parts of the code generator use a
        sequence of 'formal parameters' with no C-- kinds.  For these we now
        have the types
          type CmmFormalWithoutKind   = LocalReg
          type CmmFormalsWithoutKinds = [CmmFormalWithoutKind]
        A great many appearances of (Tau, MachHint) have been simplified to
        the appropriate CmmFormal or CmmActual, though I'm sure there are
        more opportunities.
        Kind and its data constructors are now renamed to
           data GCKind = GCKindPtr | GCKindNonPtr 
        to avoid confusion with the Kind used in the type checker and with CmmKind.
      Finally, in a somewhat unrelated bit (and in honor of Simon PJ, who
      thought of the name), the Whalley/Davidson 'transaction limit' is now
      called 'OptimizationFuel' with the net effect that there are no longer
      two unrelated uses of the abbreviation 'tx'.
  14. 05 Sep, 2007 1 commit
    • nr@eecs.harvard.edu's avatar
      change of representation for GenCmm, GenCmmTop, CmmProc · 16dc208a
      nr@eecs.harvard.edu authored
      The type parameter to a C-- procedure now represents a control-flow
      graph, not a single instruction.  The newtype ListGraph preserves the 
      current representation while enabling other representations and a
      sensible way of prettyprinting.  Except for a few changes in the
      prettyprinter the new compiler binary should be bit-for-bit identical
      to the old.
  15. 04 Sep, 2007 1 commit
  16. 03 Sep, 2007 1 commit
  17. 01 Sep, 2007 1 commit
  18. 20 Aug, 2007 1 commit
  19. 09 Aug, 2007 1 commit
  20. 31 Jul, 2007 1 commit
    • Clemens Fruhwirth's avatar
      Change the strategy to determine dynamic data access · 81b2276f
      Clemens Fruhwirth authored
      Instead of attaching the information whether a Label is going to be
      accessed dynamically or not (distinction between IdLabel/DynLabel and
      additional flags in ModuleInitLabel and PlainModuleInitLabel), we hand
      dflags through the CmmOpt monad and the NatM monad. Before calling
      labelDynamic in PositionIndependentCode, we extract thisPackage from
      dflags and supply the current package to labelDynamic, so it can take
      this information into account instead of extracting it from the labels
      itself. This simplifies a lot of code in codeGen that just hands
      through this_pkg.
  21. 27 Jul, 2007 1 commit
    • Simon Marlow's avatar
      Pointer Tagging · 6015a94f
      Simon Marlow authored
      This patch implements pointer tagging as per our ICFP'07 paper "Faster
      laziness using dynamic pointer tagging".  It improves performance by
      10-15% for most workloads, including GHC itself.
      The original patches were by Alexey Rodriguez Yakushev
      <mrchebas@gmail.com>, with additions and improvements by me.  I've
      re-recorded the development as a single patch.
      The basic idea is this: we use the low 2 bits of a pointer to a heap
      object (3 bits on a 64-bit architecture) to encode some information
      about the object pointed to.  For a constructor, we encode the "tag"
      of the constructor (e.g. True vs. False), for a function closure its
      arity.  This enables some decisions to be made without dereferencing
      the pointer, which speeds up some common operations.  In particular it
      enables us to avoid costly indirect jumps in many cases.
      More information in the commentary:
  22. 10 Jul, 2007 1 commit
    • andy@galois.com's avatar
      FIX rts build failure for powerPC build · 6103e1e2
      andy@galois.com authored
      The rts was failing with 
      ../compiler/ghc-inplace -H64m -Onot -fasm -optc-O2 -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint  -hisuf thr_p_hi -hcsuf thr_p_hc -osuf thr_p_o -optc-DTHREADED_RTS -prof -#include posix/Itimer.h  -c PrimOps.cmm -o PrimOps.thr_p_o
      ghc-6.7.20070709: panic! (the 'impossible' happened)
        (GHC version 6.7.20070709 for powerpc-apple-darwin):
              iselExpr64(powerpc) %MO_U_Conv_I32_I64(16 / 4 - 2)
      There was a special case for x86; so it has been transliterated to the PPC, and the output code looks plausable.
  23. 08 Jul, 2007 1 commit
  24. 05 Jul, 2007 1 commit
  25. 28 Jun, 2007 1 commit
  26. 27 Jun, 2007 4 commits
  27. 25 May, 2007 1 commit
    • Michael D. Adams's avatar
      Moved global register saving from the backend to codeGen · bd3a364d
      Michael D. Adams authored
      This frees the Cmm data type from keeping a list of live global registers
      in CmmCall which helps prepare for the CPS conversion phase.
      CPS conversion does its own liveness analysis and takes input that should
      not directly refer to parameter registers (e.g. R1, F5, D3, L2).  Since
      these are the only things which could occur in the live global register
      list, CPS conversion makes that field of the CmmCall constructor obsolite.
      Once the CPS conversion pass is fully implemented, global register saving
      will move from codeGen into the CPS pass.  Until then, this patch
      is worth scrutinizing and testing to ensure it doesn't cause any performance
      or correctness problems as the code passed to the backends by the CPS
      converting will look very similar to the code that this patch makes codeGen
      pass to the backend.
  28. 26 Jun, 2007 1 commit
  29. 13 Jun, 2007 2 commits
  30. 18 May, 2007 1 commit
  31. 03 May, 2007 1 commit
  32. 01 Mar, 2007 2 commits