1. 28 May, 2009 2 commits
  2. 18 May, 2009 1 commit
    • Ben.Lippmeier@anu.edu.au's avatar
      Split Reg into vreg/hreg and add register pairs · f9288086
      Ben.Lippmeier@anu.edu.au authored
       * The old Reg type is now split into VirtualReg and RealReg.
       * For the graph coloring allocator, the type of the register graph
         is now (Graph VirtualReg RegClass RealReg), which shows that it colors
         in nodes representing virtual regs with colors representing real regs.
         (as was intended)  
       * RealReg contains two contructors, RealRegSingle and RealRegPair,
         where RealRegPair is used to represent a SPARC double reg 
         constructed from two single precision FP regs. 
       * On SPARC we can now allocate double regs into an arbitrary register
         pair, instead of reserving some reg ranges to only hold float/double values. 
      f9288086
  3. 20 May, 2009 1 commit
  4. 17 May, 2009 1 commit
  5. 20 May, 2009 3 commits
  6. 19 May, 2009 1 commit
  7. 01 May, 2009 1 commit
    • Duncan Coutts's avatar
      Make ghc -dynamic imply -fPIC for C code · 431e40e1
      Duncan Coutts authored
      As is already the case for ghc -fPIC. This is needed because ghc -dynamic
      means to generate code that is capable of being linked to Haskell shared
      libs and for C code the equivalent is -fPIC. Normally C code does not need
      -fPIC merely to link to shared libs however Haskell shared libs do not
      follow common conventions. In particular the static data cannot be
      referenced statically because it cannot be copied by the static linker.
      The linker cannot copy them because we do not specify a .size for the
      _closure entries (in the .data section) though in principle we could.
      431e40e1
  8. 09 Apr, 2009 1 commit
    • simonpj@microsoft.com's avatar
      Fix Trac #3155: better error message when -XRankNTypes is omitted · 6c06fdc7
      simonpj@microsoft.com authored
      This patch sligtly re-adjusts the way in which the syntax of types 
      is handled:
      
       * In the lexer, '.' and '*' are always accepted in types
         (previously it was conditional).  This things can't mean
         anything else in H98, which is the only reason for doing things
         conditionally in the lexer.
      
       * As a result '.' in types is never treated as an operator.
         Instead, lacking a 'forall' keyword, it turns into a plain parse error.
      
       * Test for -XKindSignatures in the renamer when processing
           a) type variable bindings
           b) types with sigs (ty :: kind-sig)
      
       * Make -XKindSignatures be implied by -XTypeFamilies 
         Previously this was buried in the conditonal lexing of '*'
      6c06fdc7
  9. 02 Apr, 2009 1 commit
    • simonpj@microsoft.com's avatar
      Float constants to top-level even in first full laziness pass · eaeca51e
      simonpj@microsoft.com authored
      This patch changes the compilation pipeline flags so that constants
      are floated to the top level even in the first full laziness pass.
      For some reason this was not done before.  Fixing this makes a big
      improvement in 'spectral/rewrite', and has zero effect on any other
      nofib benchmark.
      eaeca51e
  10. 18 Mar, 2009 1 commit
  11. 15 Feb, 2009 1 commit
    • Ben.Lippmeier@anu.edu.au's avatar
      NCG: Split up the native code generator into arch specific modules · b04a210e
      Ben.Lippmeier@anu.edu.au authored
        - nativeGen/Instruction defines a type class for a generic
          instruction set. Each of the instruction sets we have, 
          X86, PPC and SPARC are instances of it.
        
        - The register alloctors use this type class when they need
          info about a certain register or instruction, such as
          regUsage, mkSpillInstr, mkJumpInstr, patchRegs..
        
        - nativeGen/Platform defines some data types enumerating
          the architectures and operating systems supported by the 
          native code generator.
        
        - DynFlags now keeps track of the current build platform, and 
          the PositionIndependentCode module uses this to decide what
          to do instead of relying of #ifdefs.
        
        - It's not totally retargetable yet. Some info info about the
          build target is still hardwired, but I've tried to contain
          most of it to a single module, TargetRegs.
        
        - Moved the SPILL and RELOAD instructions into LiveInstr.
        
        - Reg and RegClass now have their own modules, and are shared
          across all architectures.
      b04a210e
  12. 02 Feb, 2009 1 commit
  13. 13 Jan, 2009 1 commit
  14. 31 Dec, 2008 2 commits
  15. 18 Dec, 2008 1 commit
  16. 11 Dec, 2008 1 commit
  17. 09 Dec, 2008 1 commit
    • Ian Lynagh's avatar
      Make some profiling flags dynamic · aedb94f5
      Ian Lynagh authored
      In particular:
          -fauto-sccs-on-all-toplevs          -auto-all   -no-auto-all
          -fauto-sccs-on-exported-toplevs     -auto       -no-auto
          -fauto-sccs-on-individual-cafs      -caf-all    -no-caf-all
      aedb94f5
  18. 02 Dec, 2008 1 commit
  19. 30 Nov, 2008 1 commit
  20. 28 Nov, 2008 1 commit
  21. 14 Aug, 2008 1 commit
    • dias@eecs.harvard.edu's avatar
      Merging in the new codegen branch · 176fa33f
      dias@eecs.harvard.edu authored
      This merge does not turn on the new codegen (which only compiles
      a select few programs at this point),
      but it does introduce some changes to the old code generator.
      
      The high bits:
      1. The Rep Swamp patch is finally here.
         The highlight is that the representation of types at the
         machine level has changed.
         Consequently, this patch contains updates across several back ends.
      2. The new Stg -> Cmm path is here, although it appears to have a
         fair number of bugs lurking.
      3. Many improvements along the CmmCPSZ path, including:
         o stack layout
         o some code for infotables, half of which is right and half wrong
         o proc-point splitting
      176fa33f
  22. 18 Nov, 2008 1 commit
    • Simon Marlow's avatar
      Add optional eager black-holing, with new flag -feager-blackholing · d600bf7a
      Simon Marlow authored
      Eager blackholing can improve parallel performance by reducing the
      chances that two threads perform the same computation.  However, it
      has a cost: one extra memory write per thunk entry.  
      
      To get the best results, any code which may be executed in parallel
      should be compiled with eager blackholing turned on.  But since
      there's a cost for sequential code, we make it optional and turn it on
      for the parallel package only.  It might be a good idea to compile
      applications (or modules) with parallel code in with
      -feager-blackholing.
      
      ToDo: document -feager-blackholing.
      d600bf7a
  23. 13 Nov, 2008 1 commit
    • Thomas Schilling's avatar
      Fix a bug in the recompilation checking logic. · 5c9424bb
      Thomas Schilling authored
      Previously, using target HscNothing resulted in unnessesary
      recompilation because 'upsweep_mod' treated HscInterface specially.
      This patch changes relaxes this.
      
      When running GHC with debug level 5, 'upsweep_mod' will now also be
      more verbose about what it is doing.
      
      There is (at least) one possible remaining problem, though: When using
      target 'HscNothing' we generate a fake linkable to signal that we have
      processed a module.  When switching to 'HscInterpreted' this may cause
      objects to not be recompiled.  Switching from HscNothing to
      HscInterpreted is therefore only safe if we unload everything first.
      5c9424bb
  24. 30 Oct, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Add (a) CoreM monad, (b) new Annotations feature · 9bcd95ba
      simonpj@microsoft.com authored
      This patch, written by Max Bolingbroke,  does two things
      
      1.  It adds a new CoreM monad (defined in simplCore/CoreMonad),
          which is used as the top-level monad for all the Core-to-Core
          transformations (starting at SimplCore).  It supports
             * I/O (for debug printing)
             * Unique supply
             * Statistics gathering
             * Access to the HscEnv, RuleBase, Annotations, Module
          The patch therefore refactors the top "skin" of every Core-to-Core
          pass, but does not change their functionality.
      
      2.  It adds a completely new facility to GHC: Core "annotations".
          The idea is that you can say
             {#- ANN foo (Just "Hello") #-}
          which adds the annotation (Just "Hello") to the top level function
          foo.  These annotations can be looked up in any Core-to-Core pass,
          and are persisted into interface files.  (Hence a Core-to-Core pass
          can also query the annotations of imported things.)  Furthermore,
          a Core-to-Core pass can add new annotations (eg strictness info)
          of its own, which can be queried by importing modules.
      
      The design of the annotation system is somewhat in flux.  It's
      designed to work with the (upcoming) dynamic plug-ins mechanism,
      but is meanwhile independently useful.
      
      Do not merge to 6.10!  
      9bcd95ba
  25. 14 Oct, 2008 1 commit
  26. 01 Oct, 2008 1 commit
  27. 02 Oct, 2008 1 commit
    • rl@cse.unsw.edu.au's avatar
      Prevent excessive inlining with DPH · 444c6250
      rl@cse.unsw.edu.au authored
      This adds a new flag -finline-if-enough-args which disables inlining for
      partially applied functions. It is automatically set by -Odph. This is a
      temporary hack and should remain undocumented.
      
      MERGE TO 6.10
      444c6250
  28. 27 Sep, 2008 1 commit
  29. 25 Sep, 2008 1 commit
  30. 23 Sep, 2008 1 commit
  31. 22 Sep, 2008 1 commit
  32. 18 Sep, 2008 2 commits
    • pepe's avatar
      Fix a couple of issues with :print · decbb181
      pepe authored
            
            - Ticket #1995: Unsoundness with newtypes
            - Ticket #2475: "Can't unify" error when stopped at an exception
            
            In addition this patch adds the following:
            
            - Unfailingness: RTTI cannot panic anymore. 
              In case of failure, it recovers gracefully by returning the "I know nothing" type
            - A -ddump-rtti flag
      decbb181
    • Jedai's avatar
      RichTokenStream support · 36104d7a
      Jedai authored
      This patch adds support for raw token streams, that contain more
      information than normal token streams (they contains comments at
      least). The "lexTokenStream" function brings this support to the
      Lexer module. In addition to that, functions have been added to
      the GHC module to make easier to recover of the token stream of 
      a module ("getTokenStream").
      
      Building on that, I added what could be called "rich token
      stream": token stream to which have been added the source string
      corresponding to each token, the function addSourceToToken takes
      a StringBuffer and a starting SrcLoc and a token stream and build
      this rich token stream. getRichTokenStream is a convenience
      function to get a module rich token stream. "showRichTokenStream"
      use the SrcLoc information in such a token stream to get a string
      similar to the original source (except unsignificant
      whitespaces). Thus "putStrLn . showRichTokenStream =<<
      getRichTokenStream s mod" should print a valid module source, the
      interesting part being to modify the token stream between the get
      and the show of course.
      36104d7a
  33. 17 Sep, 2008 2 commits
  34. 16 Sep, 2008 1 commit