1. 31 Jul, 2008 1 commit
  2. 21 Jul, 2008 1 commit
  3. 29 May, 2008 1 commit
    • 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)
      0d80489c
  4. 30 Apr, 2008 1 commit
    • Ian Lynagh's avatar
      Update a panic message · 7dd753a0
      Ian Lynagh authored
      It was (panic "RegisterAlloc.joinToTargets"), but had since moved to
      RegAllocLinear.makeRegMovementGraph.
      7dd753a0
  5. 12 Apr, 2008 1 commit
  6. 29 Mar, 2008 2 commits
  7. 07 Feb, 2008 2 commits
  8. 02 Jan, 2008 1 commit
  9. 05 Oct, 2007 1 commit
  10. 21 Sep, 2007 1 commit
  11. 08 Sep, 2007 1 commit
  12. 07 Sep, 2007 2 commits
    • 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.
      Highlights:
      
        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'.
      
      fd8d0411
    • simonpj@microsoft.com's avatar
      Warning police · 8672676c
      simonpj@microsoft.com authored
      8672676c
  13. 05 Sep, 2007 3 commits
  14. 04 Sep, 2007 1 commit
  15. 03 Sep, 2007 1 commit
  16. 01 Sep, 2007 1 commit
  17. 24 Aug, 2007 1 commit
  18. 23 Aug, 2007 1 commit
  19. 22 Aug, 2007 1 commit
  20. 21 Aug, 2007 1 commit
  21. 14 Aug, 2007 1 commit
    • Ben.Lippmeier@anu.edu.au's avatar
      Add graph coloring register allocator. · 0f7d268d
      Ben.Lippmeier@anu.edu.au authored
      Refactored linear allocator into separate liveness annotation and allocation stages.
      Added graph coloring allocator, use -fregs-graph to enable.
        New dump flags are
          -ddump-asm-native          -- output of cmm -> native transform.
          -ddump-asm-liveness        -- code annotated with register liveness info
          -ddump-asm-coalesce        -- output of register move coalescing
                                          (this is a separate pass when using the coloring allocator)
                                          (this could change in the future)
          -ddump-asm-regalloc        -- code after register allocation
          -ddump-asm-regalloc-stages -- blocks after each build/spill stage of coloring allocator
          -ddump-asm-conflicts       -- a global register liveness graph in graphviz format 
              
      The new register allocator will allocate some registers, but it's not
      quite ready for prime-time yet. The spill code generator needs some work...
      0f7d268d
  22. 14 Jul, 2007 1 commit
    • Clemens Fruhwirth's avatar
      joinToTargets to emit fixup code even when movement graph contains cycles · 64f0661e
      Clemens Fruhwirth authored
      First, cycles can only start of with registers and their destination
      must involve a register location. This is because memory locations are
      allocated exclusively for a virtual register and hence can never cause
      a conflict in the assignment, hence need no fixup code. Therefore, we
      only have to deal with InReg -> InReg, or InReg -> InReg/InMem
      movements.  
      
      The strategy is to take the first cycle element, which is guaranteed
      to start with a register, spill it to a fresh memory location, compute
      the fixup for the rest, and restore from the spill slot to its
      destinations. The "rest" will degenerate into an acyclic scc, so we do
      not need take care of the empty list case in CyclicScc. 
       ***END OF DESCRIPTION***
      
      Place the long patch description above the ***END OF DESCRIPTION*** marker.
      The first line of this file will be the patch name.
      
      
      This patch contains the following changes:
      
      M ./compiler/nativeGen/RegisterAlloc.hs -6 +27
      64f0661e
  23. 05 Jul, 2007 1 commit
  24. 23 Jan, 2007 1 commit
    • Simon Marlow's avatar
      Fix a bug in the liveness analysis · 79791534
      Simon Marlow authored
      We were being overly conservative, registers that were live only at a
      branch target were not recorded as being dead in the branch-not-taken
      code.
      79791534
  25. 24 Nov, 2006 1 commit
  26. 11 Oct, 2006 1 commit
  27. 29 Jun, 2006 2 commits
  28. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  29. 25 Feb, 2006 2 commits
    • wolfgang.thaller@gmx.net's avatar
      NCG: Fix Typo in Register Allocator Loop Patch · 17fc6271
      wolfgang.thaller@gmx.net authored
      Fix previous patch "NCG: Handle loops in register allocator"
      Of course, I broke it when correcting a style problem just before committing.
      17fc6271
    • wolfgang.thaller@gmx.net's avatar
      NCG: Handle loops in register allocator · 34f992d3
      wolfgang.thaller@gmx.net authored
      Fill in the missing parts in the register allocator so that it can
      handle loops.
      
      *) The register allocator now runs in the UniqSuppy monad, as it needs
         to be able to generate unique labels for fixup code blocks.
      
      *) A few functions have been added to RegAllocInfo:
      	mkRegRegMoveInstr -- generates a good old move instruction
      	mkBranchInstr     -- used to be MachCodeGen.genBranch
      	patchJump         -- Change the destination of a jump
      
      *) The register allocator now makes sure that only one spill slot is used
         for each temporary, even if it is spilled and reloaded several times.
         This obviates the need for memory-to-memory moves in fixup code.
      
      LIMITATIONS:
      
      *) The case where the fixup code needs to cyclically permute a group of
         registers is currently unhandled. This will need more work once we come
         accross code where this actually happens.
      
      *) Register allocation for code with loop is probably very inefficient
         (both at compile-time and at run-time).
      
      *) We still cannot compile the RTS via NCG, for various other reasons.
      34f992d3
  30. 21 Dec, 2005 1 commit
  31. 24 Sep, 2005 1 commit
  32. 26 Jul, 2005 1 commit
  33. 15 Jun, 2005 1 commit