1. 06 Sep, 2007 8 commits
    • Duncan Coutts's avatar
      Updates to work with latest cabal. · 8fa821cd
      Duncan Coutts authored
      8fa821cd
    • nr@eecs.harvard.edu's avatar
      massive changes to add a 'zipper' representation of C-- · 16a2f6a8
      nr@eecs.harvard.edu authored
      Changes too numerous to comment on, but here is some old history that
      I saved: 
      
      
      Wed Aug 15 11:07:13 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * type synonyms made consistent with new Cmm types
      
          M ./compiler/nativeGen/MachInstrs.hs -2 +2
      
      Mon Aug 20 19:22:14 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * pushing return info beyond cmm into codegen
      
          M ./compiler/codeGen/Bitmap.hs r3
          M ./compiler/codeGen/CgBindery.lhs r3
          M ./compiler/codeGen/CgCallConv.hs r3
          M ./compiler/codeGen/CgCase.lhs r3
          M ./compiler/codeGen/CgClosure.lhs r3
          M ./compiler/codeGen/CgCon.lhs r3
          M ./compiler/codeGen/CgExpr.lhs r3
          M ./compiler/codeGen/CgForeignCall.hs -6 +7 r3
          M ./compiler/codeGen/CgHeapery.lhs r3
          M ./compiler/codeGen/CgHpc.hs +1 r3
          M ./compiler/codeGen/CgInfoTbls.hs r3
          M ./compiler/codeGen/CgLetNoEscape.lhs r3
          M ./compiler/codeGen/CgMonad.lhs r3
          M ./compiler/codeGen/CgParallel.hs r3
          M ./compiler/codeGen/CgPrimOp.hs +3 r3
          M ./compiler/codeGen/CgProf.hs r3
          M ./compiler/codeGen/CgStackery.lhs r3
          M ./compiler/codeGen/CgTailCall.lhs r3
          M ./compiler/codeGen/CgTicky.hs r3
          M ./compiler/codeGen/CgUtils.hs -1 +1 r3
          M ./compiler/codeGen/ClosureInfo.lhs r3
          M ./compiler/codeGen/CodeGen.lhs r3
          M ./compiler/codeGen/SMRep.lhs r3
          M ./compiler/nativeGen/AsmCodeGen.lhs -2 +2 r1
          M ./compiler/nativeGen/MachCodeGen.hs -3 +3 r1
          M ./compiler/nativeGen/MachInstrs.hs r1
          M ./compiler/nativeGen/MachRegs.lhs r1
          M ./compiler/nativeGen/NCGMonad.hs r1
          M ./compiler/nativeGen/PositionIndependentCode.hs r1
          M ./compiler/nativeGen/PprMach.hs r1
          M ./compiler/nativeGen/RegAllocInfo.hs r1
          M ./compiler/nativeGen/RegisterAlloc.hs r1
      
      Mon Aug 20 20:54:41 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * put CmmReturnInfo into a CmmCall (and related types)
      
          M ./compiler/cmm/Cmm.hs -2 +1 r3
          M ./compiler/cmm/CmmBrokenBlock.hs -13 +12 r1
          M ./compiler/cmm/CmmCPS.hs -3 +3
          M ./compiler/cmm/CmmCPSGen.hs -8 +6 r1
          M ./compiler/cmm/CmmLint.hs -1 +1
          M ./compiler/cmm/CmmLive.hs -1 +1
          M ./compiler/cmm/CmmOpt.hs -3 +3
          M ./compiler/cmm/CmmParse.y -6 +6 r3
          M ./compiler/cmm/PprC.hs -3 +3
          M ./compiler/cmm/PprCmm.hs -7 +4 r2
          M ./compiler/codeGen/CgForeignCall.hs -7 +6 r2
          M ./compiler/codeGen/CgHpc.hs -1 r1
          M ./compiler/codeGen/CgPrimOp.hs -3 r1
          M ./compiler/codeGen/CgUtils.hs -1 +1 r1
          M ./compiler/nativeGen/AsmCodeGen.lhs -2 +2
          M ./compiler/nativeGen/MachCodeGen.hs -3 +3 r1
      
      Tue Aug 21 18:09:13 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * add call info in nativeGen
      
          M ./compiler/nativeGen/AsmCodeGen.lhs r1
          M ./compiler/nativeGen/MachInstrs.hs r1
          M ./compiler/nativeGen/MachRegs.lhs r1
          M ./compiler/nativeGen/NCGMonad.hs r1
          M ./compiler/nativeGen/PositionIndependentCode.hs r1
          M ./compiler/nativeGen/PprMach.hs r1
          M ./compiler/nativeGen/RegAllocInfo.hs r1
      
      Wed Aug 22 16:41:58 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * ListGraph is now a newtype, not a synonym
        The resultant bookkeepping is unenviable, but the change
        greatly simplifies our ability to make Cmm things propertly
        Outputable for both list-graph and zipper-graph representations.
      
          M ./compiler/cmm/Cmm.hs -5 +3
          M ./compiler/cmm/CmmCPS.hs -2 +2
          M ./compiler/cmm/CmmCPSGen.hs -1 +1
          M ./compiler/cmm/CmmContFlowOpt.hs -3 +3
          M ./compiler/cmm/CmmCvt.hs -2 +2
          M ./compiler/cmm/CmmInfo.hs -2 +3
          M ./compiler/cmm/CmmLint.hs -1 +1
          M ./compiler/cmm/CmmOpt.hs -2 +2
          M ./compiler/cmm/PprC.hs -1 +1
          M ./compiler/cmm/PprCmm.hs -5 +8
          M ./compiler/cmm/PprCmmZ.hs -7 +1
          M ./compiler/codeGen/CgMonad.lhs -1 +1
          M ./compiler/nativeGen/AsmCodeGen.lhs -15 +15
          M ./compiler/nativeGen/MachCodeGen.hs -2 +2
          M ./compiler/nativeGen/PositionIndependentCode.hs -6 +6
          M ./compiler/nativeGen/PprMach.hs -3 +2
          M ./compiler/nativeGen/RegAllocColor.hs +1
          M ./compiler/nativeGen/RegAllocLinear.hs -4 +5
          M ./compiler/nativeGen/RegCoalesce.hs -6 +6
          M ./compiler/nativeGen/RegLiveness.hs -12 +12
      
      Thu Aug 23 13:44:49 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * diagnostic assistance in case fromJust fails
      
          M ./compiler/nativeGen/MachCodeGen.hs -2 +5
      
      Thu Aug 23 14:07:28 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * give every block, even the first, a label
          With branch-chain elimination, the first block of a procedure
          might be the target of a branch.  This actually happens to 
          a dozen or more procedures in the run-time system.
      
          M ./compiler/nativeGen/PprMach.hs -8 +3
      
      Fri Aug 24 17:27:04 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * clean up the code in PprMach
      
          M ./compiler/nativeGen/PprMach.hs -16 +14
      
      Fri Aug 24 19:35:03 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * a bunch of impedance matching to get the compiler to build, plus 
         * the plus is diagnostics for unreachable code, which required
           moving a lot of prettyprinting code
      
          M ./compiler/cmm/Cmm.hs -7 +5
          M ./compiler/cmm/CmmCPSZ.hs -1 +1
          M ./compiler/cmm/CmmCvt.hs -8 +8
          M ./compiler/cmm/CmmParse.y -4 +3
          M ./compiler/cmm/MkZipCfg.hs -19 +9
          M ./compiler/cmm/PprCmmZ.hs -118 +4
          M ./compiler/cmm/ZipCfg.hs -1 +13
          M ./compiler/cmm/ZipCfgCmm.hs -10 +129
          M ./compiler/main/HscMain.lhs -4 +4
          M ./compiler/nativeGen/NCGMonad.hs -2 +2
          M ./compiler/nativeGen/RegAllocInfo.hs -3 +3
      
      Fri Aug 31 14:38:02 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
        * fix a warning about an import
      
          M ./compiler/nativeGen/RegAllocColor.hs -1 +1
      16a2f6a8
    • judah.jacobson@gmail.com's avatar
      Make installPackage install settings from the [package].buildinfo file. · 5fccc856
      judah.jacobson@gmail.com authored
      M ./libraries/installPackage.hs -1 +14
      5fccc856
    • Ian Lynagh's avatar
    • Ian Lynagh's avatar
      Remove hardtop_plat/FPTOOLS_TOP_ABS_PLATFORM · c140c141
      Ian Lynagh authored
      They are now the same as hardtop/FPTOOLS_TOP_ABS, so use those instead.
      
      Also removed some substitutions of / for \, as we now use a Haskell
      program to find the top path, and it only makes paths with /s in.
      c140c141
    • Ben.Lippmeier@anu.edu.au's avatar
      Cure space leak in coloring register allocator · b7f448a4
      Ben.Lippmeier@anu.edu.au authored
      We now do a deep seq on the graph after it is 'built', but before coloring.
      Without this, the colorer will just force bits of it and the heap will
      fill up with half evaluated pieces of graph from previous build/spill
      stages and zillions of apply thunks.
      b7f448a4
    • Ben.Lippmeier@anu.edu.au's avatar
      Small improvement to GraphColor.selectColor · 94368126
      Ben.Lippmeier@anu.edu.au authored
      When selecting a color for a node, try and avoid using colors that
      conflicting nodes prefer. Not sure if this'll make much difference,
      but it was easy enough to add..
      94368126
    • Ian Lynagh's avatar
      d0249441
  2. 05 Sep, 2007 1 commit
  3. 06 Sep, 2007 6 commits
  4. 05 Sep, 2007 1 commit
  5. 06 Sep, 2007 1 commit
    • Simon Marlow's avatar
      FIX #1465, error messages could sometimes say things like "A.T doesn't match A.T" · 42181975
      Simon Marlow authored
      This turned out to be a black hole, however we believe we now have a
      plan that does the right thing and shouldn't need to change again.
      Error messages will only ever refer to a name in an unambiguous way,
      falling back to <package>:<module>.<name> if no unambiguous shorter
      variant can be found.  See HscTypes.mkPrintUnqualified for the
      details.
      
      Earlier hacks to work around this problem have been removed (TcSimplify).
      42181975
  6. 05 Sep, 2007 2 commits
    • Simon Marlow's avatar
      fix error in .hi-boot-6 · c02da7d1
      Simon Marlow authored
      c02da7d1
    • Ben.Lippmeier@anu.edu.au's avatar
      Improve GraphColor.colorScan · 1dd44153
      Ben.Lippmeier@anu.edu.au authored
      Testing whether a node in the conflict graph is trivially 
      colorable (triv) is still a somewhat expensive operation.
      
      When we find a triv node during scanning, even though we remove
      it and its edges from the graph, this is unlikely to to make the
      nodes we've just scanned become triv - so there's not much point
      re-scanning them right away.
      
      Scanning now takes place in passes. We scan the whole graph for
      triv nodes and remove all the ones found in a batch before rescanning
      old nodes.
      
      Register allocation for SHA1.lhs now takes (just) 40% of total
      compile time with -O2 -fregs-graph on x86
      1dd44153
  7. 06 Sep, 2007 2 commits
  8. 05 Sep, 2007 8 commits
    • chak@cse.unsw.edu.au.'s avatar
    • Ian Lynagh's avatar
      Add an OPTIONS -w pragma to utils/genprimopcode/Lexer.xx · 7d6363d6
      Ian Lynagh authored
      SPJ reports that it has warnings (=> errors with -Werror) on Windows.
      7d6363d6
    • Ian Lynagh's avatar
    • Ian Lynagh's avatar
      Don't give warnings in compat · d3b882ae
      Ian Lynagh authored
      There are lots of warnings in here due to things like modules being
      imported that, in some versions of GHC, aren't used. Thus we don't
      give any warnings in here, and therefore validating with -Werror won't
      make the build fail.
      
      An alternative would be to do
      SRC_HC_OPTS := $(filter-out -Werror,$(SRC_HC_OPTS))
      but if warnings are expected then there is little point in spewing them
      out anyway.
      
      On the other hand, there aren't any warnings for me (GHC 6.6 on Linux/amd64),
      so perhaps it would be worth fixing them instead.
      d3b882ae
    • Ian Lynagh's avatar
      Typo · 1ee0b69e
      Ian Lynagh authored
      1ee0b69e
    • Ian Lynagh's avatar
      Fix bindist creation on Windows · b18545dd
      Ian Lynagh authored
      b18545dd
    • Ian Lynagh's avatar
      Fix up bindist creation and publishing · cafb1e0f
      Ian Lynagh authored
      cafb1e0f
    • simonpj@microsoft.com's avatar
      Refactor, improve, and document the deriving mechanism · 25f84fa7
      simonpj@microsoft.com authored
      This patch does a fairly major clean-up of the code that implements 'deriving.
      
      * The big changes are in TcDeriv, which is dramatically cleaned up.
        In particular, there is a clear split into
      	a) inference of instance contexts for deriving clauses
      	b) generation of the derived code, given a context 
        Step (a) is skipped for standalone instance decls, which 
        have an explicitly provided context.
      
      * The handling of "taggery", which is cooperative between TcDeriv and
        TcGenDeriv, is cleaned up a lot
      
      * I have added documentation for standalone deriving (which was 
        previously wrong).
      
      * The Haskell report is vague on exactly when a deriving clause should
        succeed.  Prodded by Conal I have loosened the rules slightly, thereyb
        making drv015 work again, and documented the rules in the user manual.
      
      I believe this patch validates ok (once I've update the test suite)
      and can go into the 6.8 branch.
      25f84fa7
  9. 29 Aug, 2007 1 commit
  10. 05 Sep, 2007 6 commits
    • Ben.Lippmeier@anu.edu.au's avatar
      Refactor MachRegs.trivColorable to do unboxed accumulation · a8312580
      Ben.Lippmeier@anu.edu.au authored
      trivColorable was soaking up total 31% time, 41% alloc when
      compiling SHA1.lhs with -O2 -fregs-graph on x86.
      
      Refactoring to use unboxed accumulators and walk directly
      over the UniqFM holding the set of conflicts reduces this 
      to 17% time, 6% alloc.
      a8312580
    • 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.
      16dc208a
    • nr@eecs.harvard.edu's avatar
      807b00a7
    • Simon Marlow's avatar
      fix warnings · 81f944da
      Simon Marlow authored
      81f944da
    • Simon Marlow's avatar
      FIX #1650: ".boot modules interact badly with the ghci debugger" · e2782137
      Simon Marlow authored
      In fact hs-boot files had nothing to do with it: the problem was that
      GHCi would forget the breakpoint information for a module that had
      been reloaded but not recompiled.  It's amazing that we never noticed
      this before.
      
      The ModBreaks were in the ModDetails, which was the wrong place.  When
      we avoid recompiling a module, ModDetails is regenerated from ModIface
      by typecheckIface, and at that point it has no idea what the ModBreaks
      should be, so typecheckIface made it empty.  The right place for the
      ModBreaks to go is with the Linkable, which is retained when
      compilation is avoided.  So now I've placed the ModBreaks in with the
      CompiledByteCode, which also makes it clear that only byte-code
      modules have breakpoints.
      
      This fixes break022/break023
      e2782137
    • Simon Marlow's avatar
      Fix boot: it was avoiding autoreconfing · b1f0cd39
      Simon Marlow authored
      Two problems here: find needs to dereference symbolic links (-L
      option, I really hope that's portable), and we need to notice when
      aclocal.m4 is updated.  
      
      Somehow I think this was easier when it just always ran
      autoreconf... what was wrong with that?
      b1f0cd39
  11. 04 Sep, 2007 4 commits