ghc-hetmet.git
5 years agofix haddock submodule pointer master
Adam Megacz [Sun, 13 Apr 2014 19:31:13 +0000 (12:31 -0700)]
fix haddock submodule pointer

5 years agoupdate .gitmodules pointers to git.haskell.org
Adam Megacz [Sun, 13 Apr 2014 19:21:59 +0000 (12:21 -0700)]
update .gitmodules pointers to git.haskell.org

5 years agoupdate submodules
Adam Megacz [Sun, 13 Apr 2014 19:14:22 +0000 (12:14 -0700)]
update submodules

7 years agoupdate submodules for GHC.HetMet.GArrow -> Control.GArrow renaming
Adam Megacz [Fri, 20 Apr 2012 05:42:44 +0000 (22:42 -0700)]
update submodules for GHC.HetMet.GArrow -> Control.GArrow renaming

8 years agoallow either <[]> or <{}> at the type level
Adam Megacz [Tue, 4 Oct 2011 18:28:56 +0000 (13:28 -0500)]
allow either <[]> or <{}> at the type level

8 years agoswap <[]> and <{}> syntax
Adam Megacz [Sun, 2 Oct 2011 02:40:02 +0000 (19:40 -0700)]
swap <[]> and <{}> syntax

8 years agoadd support for <{..}> and ~~> syntax as well as typing for Kappa-calculus
Adam Megacz [Thu, 1 Sep 2011 04:37:51 +0000 (21:37 -0700)]
add support for <{..}> and ~~> syntax as well as typing for Kappa-calculus

8 years agoadd pretty-printing of <[...]>@.. types
Adam Megacz [Wed, 31 Aug 2011 23:56:45 +0000 (16:56 -0700)]
add pretty-printing of <[...]>@.. types

8 years agoupdate submodule pointers
Adam Megacz [Tue, 30 Aug 2011 07:39:54 +0000 (00:39 -0700)]
update submodule pointers

8 years agoadd submodule for all upstream repos
Adam Megacz [Tue, 30 Aug 2011 05:19:14 +0000 (22:19 -0700)]
add submodule for all upstream repos

8 years agoupdate submodule pointers
Adam Megacz [Tue, 30 Aug 2011 05:10:43 +0000 (22:10 -0700)]
update submodule pointers

8 years agoupdate submodule pointers
Adam Megacz [Mon, 4 Jul 2011 05:48:15 +0000 (22:48 -0700)]
update submodule pointers

8 years agoupdate submodule pointers
Adam Megacz [Wed, 22 Jun 2011 05:26:28 +0000 (22:26 -0700)]
update submodule pointers

8 years agoupdate submodule pointers
Adam Megacz [Tue, 21 Jun 2011 03:51:48 +0000 (20:51 -0700)]
update submodule pointers

8 years agoupdate submodule pointers
Adam Megacz [Mon, 20 Jun 2011 06:42:29 +0000 (23:42 -0700)]
update submodule pointers

8 years agoupdate submodule pointers
Adam Megacz [Mon, 20 Jun 2011 02:07:59 +0000 (19:07 -0700)]
update submodule pointers

8 years agoupdate submodule pointers
Adam Megacz [Sun, 19 Jun 2011 00:59:51 +0000 (17:59 -0700)]
update submodule pointers

8 years agoput coqPassCoreToCore on the CoreM monad, greatly simplify Desugar.lhs
Adam Megacz [Sun, 19 Jun 2011 00:34:50 +0000 (17:34 -0700)]
put coqPassCoreToCore on the CoreM monad, greatly simplify Desugar.lhs

8 years agoCoreMonad: add lookupOrigCoreM, modeled after IfaceEnv.lookupOrig
Adam Megacz [Sun, 19 Jun 2011 00:34:04 +0000 (17:34 -0700)]
CoreMonad: add lookupOrigCoreM, modeled after IfaceEnv.lookupOrig

8 years agominimize impact on PrelNames
Adam Megacz [Sat, 18 Jun 2011 09:04:42 +0000 (02:04 -0700)]
minimize impact on PrelNames

8 years agoadapt to upstream changes
Adam Megacz [Wed, 15 Jun 2011 00:17:12 +0000 (17:17 -0700)]
adapt to upstream changes

8 years agomerge upstream
Adam Megacz [Tue, 14 Jun 2011 18:50:10 +0000 (11:50 -0700)]
merge upstream

8 years agoImplement regslot inlining, document soundness concerns.
Edward Z. Yang [Tue, 14 Jun 2011 17:21:50 +0000 (18:21 +0100)]
Implement regslot inlining, document soundness concerns.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoSplit out assignment rewriting to own module.
Edward Z. Yang [Tue, 14 Jun 2011 12:59:21 +0000 (13:59 +0100)]
Split out assignment rewriting to own module.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoRename CmmCPS to CmmPipeline.
Edward Z. Yang [Tue, 14 Jun 2011 11:33:37 +0000 (12:33 +0100)]
Rename CmmCPS to CmmPipeline.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoMove control flow optimization to CmmCPS.
Edward Z. Yang [Tue, 14 Jun 2011 11:29:38 +0000 (12:29 +0100)]
Move control flow optimization to CmmCPS.

Unfortunately, I couldn't remove all incidences of runCmmContFlowOpt
from HscMain; in particular, there is a Cmm conversion testing
facility which may run with only control flow optimizations, which
I preserved the semantics of.  Given the state of the current
codegen, this code might be moribund anyway.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoupdate submodule pointer
Adam Megacz [Tue, 14 Jun 2011 03:54:57 +0000 (20:54 -0700)]
update submodule pointer

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 13 Jun 2011 21:41:19 +0000 (22:41 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoImprove the reporting of module cycles, to give a nice message like this
Simon Peyton Jones [Mon, 13 Jun 2011 21:35:23 +0000 (22:35 +0100)]
Improve the reporting of module cycles, to give a nice message like this

  Module imports form a cycle:
    module `Foo4' imports `Foo'
            which imports `Foo2'
            which imports `Foo3'
            which imports `Foo4'

as requested by Bryan Richter

8 years agoRemove type synonyms for CmmFormals, CmmActuals (and hinted versions).
Edward Z. Yang [Mon, 13 Jun 2011 17:16:01 +0000 (18:16 +0100)]
Remove type synonyms for CmmFormals, CmmActuals (and hinted versions).

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoBake in ByteOff to ParamLocation, and remove ArgumentFormat synonym.
Edward Z. Yang [Mon, 13 Jun 2011 16:29:58 +0000 (17:29 +0100)]
Bake in ByteOff to ParamLocation, and remove ArgumentFormat synonym.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoRemove unused assignArguments and argumentsSize.
Edward Z. Yang [Mon, 13 Jun 2011 16:17:10 +0000 (17:17 +0100)]
Remove unused assignArguments and argumentsSize.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 13 Jun 2011 14:08:15 +0000 (15:08 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoComment only
Simon Peyton Jones [Mon, 13 Jun 2011 14:04:17 +0000 (15:04 +0100)]
Comment only

8 years agoDon't allow specialisation of class methods (fixes Trac #5001)
Simon Peyton Jones [Mon, 13 Jun 2011 14:03:38 +0000 (15:03 +0100)]
Don't allow specialisation of class methods (fixes Trac #5001)

It doesn't make sense to specialise class methods -- their
code is simply a record selector.  Moreover, such methods
don't (currently) have an inl_sat field in their InlinePragma
which made DsBinds.makeCoreArity bleat.

This patch just ignores such pragmas, with a warning.

8 years agoPort "Make array copy primops inline" and related patches to new codegen.
Edward Z. Yang [Fri, 10 Jun 2011 16:16:32 +0000 (17:16 +0100)]
Port "Make array copy primops inline" and related patches to new codegen.

The following patches were ported:

    d0faaa6 Fix segfault in array copy primops on 32-bit
    18691d4 Make assignTemp_ less pessimistic
    9c23f06 Make array copy primops inline

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoExtra comment about WithRegUsage.
Edward Z. Yang [Fri, 10 Jun 2011 16:14:31 +0000 (17:14 +0100)]
Extra comment about WithRegUsage.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 13 Jun 2011 13:39:43 +0000 (14:39 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoFix warnings
Manuel M T Chakravarty [Mon, 13 Jun 2011 13:11:03 +0000 (23:11 +1000)]
Fix warnings

8 years agoFix the SPECIALISE error in the haddock invocation of validate
Simon Peyton Jones [Mon, 13 Jun 2011 12:37:47 +0000 (13:37 +0100)]
Fix the SPECIALISE error in the haddock invocation of validate

Specifically
 - Turn the error
       "You cannot SPECIALISE f because it is not INLINEABLE"
   into a warning

 - More importantly, suppress it altogether when
     HscTarget = HscNothing or HscInterpreted
   because then we aren't going to be generating unfoldings

8 years agoAdded a pragma {-# NOVECTORISE f #-} that suppresses vectorisation of toplevel variab...
Manuel M T Chakravarty [Mon, 13 Jun 2011 10:47:43 +0000 (20:47 +1000)]
Added a pragma {-# NOVECTORISE f #-} that suppresses vectorisation of toplevel variable 'f'.

8 years agoFix building of optional packages
Ian Lynagh [Sun, 12 Jun 2011 18:58:04 +0000 (19:58 +0100)]
Fix building of optional packages

The change to the packages file format broke it

8 years agoRemove some trailing whitespace
Ian Lynagh [Sun, 12 Jun 2011 18:08:58 +0000 (19:08 +0100)]
Remove some trailing whitespace

We were getting
    InstallExtraPackages="YES    "

8 years agoTweak some makefile code
Ian Lynagh [Sun, 12 Jun 2011 13:03:34 +0000 (14:03 +0100)]
Tweak some makefile code

8 years agoRemove upstream repos from the packages file
Ian Lynagh [Sat, 11 Jun 2011 18:12:35 +0000 (19:12 +0100)]
Remove upstream repos from the packages file

We no longer pull directly from upstream repos, so it wasn't useful
to have it programatically available. The info, and more, is now on
    http://hackage.haskell.org/trac/ghc/wiki/Commentary/Libraries#Repositorylocations
instead.

8 years agoMake TH capable of quoting GADT declarations (Trac #5217)
Simon Peyton Jones [Sat, 11 Jun 2011 15:44:07 +0000 (16:44 +0100)]
Make TH capable of quoting GADT declarations (Trac #5217)

Template Haskell doesn't support GADTs directly but
we can use equality constraints to do the job. Here's
an example of the dump from splicing such a declaration:

    [d| data T a b
            where
              T1 :: Int -> T Int Char
              T2 :: a -> T a a
              T3 :: a -> T [a] a
              T4 :: a -> b -> T b [a] |]
  ======>
    T5217.hs:(6,3)-(9,53)
    data T a[aQW] b[aQX]
        = (b[aQX] ~ Char, a[aQW] ~ Int) => T1 Int |
          b[aQX] ~ a[aQW] => T2 a[aQW] |
          a[aQW] ~ [b[aQX]] => T3 b[aQX] |
          forall a[aQY]. b[aQX] ~ [a[aQY]] => T4 a[aQY] a[aQW]

8 years agoIgnore UNPACK pragmas with OmitInterfacePragmas is on (fixes Trac #5252)
Simon Peyton Jones [Sat, 11 Jun 2011 13:26:34 +0000 (14:26 +0100)]
Ignore UNPACK pragmas with OmitInterfacePragmas is on (fixes Trac #5252)

The point here is that if a data type chooses a representation that
unpacks an argument field, the representation of the argument field
must be visible to clients.  And it may not be if OmitInterfacePragmas
is on.

8 years agoFurther improvents to duplicate-export warnings (Trac #2436)
Simon Peyton Jones [Sat, 11 Jun 2011 13:23:40 +0000 (14:23 +0100)]
Further improvents to duplicate-export warnings (Trac #2436)

8 years agoComments only
Simon Peyton Jones [Sat, 11 Jun 2011 13:21:39 +0000 (14:21 +0100)]
Comments only

8 years agoWithout -O do not complain about SPECIALISE pragmas for non-INLINABLE things
Simon Peyton Jones [Sat, 11 Jun 2011 13:21:26 +0000 (14:21 +0100)]
Without -O do not complain about SPECIALISE pragmas for non-INLINABLE things

Otherwise Haddock (which compiles stuff without -O) falls over

8 years agoFix tracking of what RdrNames are used (fixes Trac #5211)
Simon Peyton Jones [Sat, 11 Jun 2011 13:19:44 +0000 (14:19 +0100)]
Fix tracking of what RdrNames are used (fixes Trac #5211)

The issue here was: what import declaration brings into
scope the 'op here

   import qualified Foo( op )
   import Bar( C(op) )
   instance C Int where
     op = ...

Well, the import of Bar, obviously.  But what if the
import Bar had been
   import Bar( C )
Then the instance is still supposed to work, getting
op from the Foo.op imported from Foo.  (I'm assuming its
the same op, of course.)

8 years agoAdd -fno-omit-interface-pragmas to SrcLoc, to work around Trac #5252
Simon Peyton Jones [Sat, 11 Jun 2011 13:12:43 +0000 (14:12 +0100)]
Add -fno-omit-interface-pragmas to SrcLoc, to work around Trac #5252

We have to do this until the earliest bootstrap compiler
has fixed #5252.  It's no big deal; it just means that
SrcLoc.hi has lots of stuff even when compiling GHC without -O.
Lacking this, you get

  (GHC version 7.0.3 for i386-unknown-mingw32):
reboxProduct: not a product ghc-7.1:SrcLoc.RealSrcLoc{tc r8J}

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 10 Jun 2011 18:54:49 +0000 (19:54 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoKill bogus duplicate-export warnings (fix Trac #2436)
Simon Peyton Jones [Fri, 10 Jun 2011 18:54:34 +0000 (19:54 +0100)]
Kill bogus duplicate-export warnings (fix Trac #2436)

The general rule is now that we don't complain about
a duplicate export from a "...".  See RnNames.dupExport_ok

8 years agoMake DsMeta catch up with LastStmt (fix Trac #5235)
Simon Peyton Jones [Fri, 10 Jun 2011 18:52:53 +0000 (19:52 +0100)]
Make DsMeta catch up with LastStmt (fix Trac #5235)

The new monad comprehension stuff introduce LastStmt,
and DsMeta must convert that to TH syntax

8 years agoComments, layout and cmm-notes
Simon Peyton Jones [Fri, 10 Jun 2011 18:45:17 +0000 (19:45 +0100)]
Comments, layout and cmm-notes

...all to do with the new codgen path

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Fri, 10 Jun 2011 17:39:53 +0000 (18:39 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoFix parsing "$topdir" in package config
Ian Lynagh [Fri, 10 Jun 2011 17:40:05 +0000 (18:40 +0100)]
Fix parsing "$topdir" in package config

It was only working when followed by something, e.g. "$topdir/base".

8 years agoTake vectorisation declarations into account during the initial occurrence analysis...
Manuel M T Chakravarty [Thu, 9 Jun 2011 12:35:03 +0000 (22:35 +1000)]
Take vectorisation declarations into account during the initial occurrence analysis (right after desugaring).

8 years agoFollow Src{Loc,Span} changes in other parts of the tree
Ian Lynagh [Thu, 9 Jun 2011 14:48:22 +0000 (15:48 +0100)]
Follow Src{Loc,Span} changes in other parts of the tree

8 years agoRefactor SrcLoc and SrcSpan
Ian Lynagh [Wed, 1 Jun 2011 23:23:27 +0000 (00:23 +0100)]
Refactor SrcLoc and SrcSpan

The "Unhelpful" cases are now in a separate type. This allows us to
improve various things, e.g.:
* Most of the panic's in SrcLoc are now gone
* The Lexer now works with RealSrcSpans rather than SrcSpans, i.e. it
  knows that it has real locations and thus can assume that the line
  number etc really exists
* Some of the more suspicious cases are no longer necessary, e.g.
  we no longer need this case in advanceSrcLoc:
      advanceSrcLoc loc _ = loc -- Better than nothing

More improvements can probably be made, e.g. tick locations can
probably use RealSrcSpans too.

8 years agoFix build
Ian Lynagh [Thu, 9 Jun 2011 12:22:16 +0000 (13:22 +0100)]
Fix build

8 years agoFix for $topdir appearing in the haddock-html field
Duncan Coutts [Thu, 9 Jun 2011 11:15:49 +0000 (12:15 +0100)]
Fix for $topdir appearing in the haddock-html field

I'd naively assumed that the haddock-html field would only use the
$httptopdir variable. Hopefully this will fix the windows build.

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Dimitrios Vytiniotis [Thu, 9 Jun 2011 10:01:11 +0000 (11:01 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoFix warnings in nativeGen/PPC/CodeGen.hs
Ian Lynagh [Wed, 8 Jun 2011 20:14:11 +0000 (21:14 +0100)]
Fix warnings in nativeGen/PPC/CodeGen.hs

8 years agoRemove platform CPP from nativeGen/PPC/CodeGen.hs
Ian Lynagh [Wed, 8 Jun 2011 20:04:10 +0000 (21:04 +0100)]
Remove platform CPP from nativeGen/PPC/CodeGen.hs

8 years agocmmTopCodeGen no longer takes DynFlags as an argument
Ian Lynagh [Wed, 8 Jun 2011 18:24:07 +0000 (19:24 +0100)]
cmmTopCodeGen no longer takes DynFlags as an argument

It is in the NatM monad, which has DynFlags as part of its state.

8 years agoFill out the osElfTarget definition
Ian Lynagh [Wed, 8 Jun 2011 17:51:18 +0000 (18:51 +0100)]
Fill out the osElfTarget definition

For now we panic in the OSUnknown case. It would probably be better
to make the enumerations complete instead, though.

8 years agoAdd a target32Bit function to Platform
Ian Lynagh [Wed, 8 Jun 2011 17:48:36 +0000 (18:48 +0100)]
Add a target32Bit function to Platform

8 years agoRemove out-of-date comment
Ian Lynagh [Wed, 8 Jun 2011 17:37:16 +0000 (18:37 +0100)]
Remove out-of-date comment

8 years agoWhitespace only in utils/Platform.hs
Ian Lynagh [Wed, 8 Jun 2011 17:34:30 +0000 (18:34 +0100)]
Whitespace only in utils/Platform.hs

8 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Dimitrios Vytiniotis [Wed, 8 Jun 2011 17:27:25 +0000 (18:27 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

8 years agoReorganized functional dependency reactions once more:
Dimitrios Vytiniotis [Wed, 8 Jun 2011 17:24:21 +0000 (18:24 +0100)]
Reorganized functional dependency reactions once more:
 1) generating Derived FDs as happens for equality superclasses
 2) Kept the optimization of immediately discharging items
    if fundeps cause a match
 3) Restructured top-reactions and interactions with inerts to
    behave similarly to each other.

In particular, (1) fixes ticket #5236.

8 years agoWhitespace only in nativeGen/PPC/CodeGen.hs
Ian Lynagh [Wed, 8 Jun 2011 16:56:47 +0000 (17:56 +0100)]
Whitespace only in nativeGen/PPC/CodeGen.hs

8 years agoFix segfault in array copy primops on 32-bit
Johan Tibell [Tue, 7 Jun 2011 12:44:23 +0000 (14:44 +0200)]
Fix segfault in array copy primops on 32-bit

The second argument to C's memset was passed as a W8 while memset
expects an int.

Signed-off-by: David Terei <davidterei@gmail.com>

8 years agofix path to ghc-pwd
Simon Marlow [Mon, 6 Jun 2011 11:53:52 +0000 (12:53 +0100)]
fix path to ghc-pwd

8 years agofix a cut/paste bug in debugging code
Simon Marlow [Mon, 6 Jun 2011 11:19:24 +0000 (12:19 +0100)]
fix a cut/paste bug in debugging code

8 years agoMerge remote branch 'working/master'
Simon Marlow [Mon, 6 Jun 2011 10:39:00 +0000 (11:39 +0100)]
Merge remote branch 'working/master'

8 years agoFix compilation of rts/win32/GetEnv.c
unknown [Sun, 5 Jun 2011 18:52:42 +0000 (19:52 +0100)]
Fix compilation of rts/win32/GetEnv.c

8 years agoFix Windows build failure
Ian Lynagh [Sun, 5 Jun 2011 18:16:35 +0000 (19:16 +0100)]
Fix Windows build failure

We were calling freeArgv with arguments of the wrong type.
But actually, we had our own copy of its loop anyway, so
now we just use that instead.

8 years agoMake dumpIfSet_dyn_or use dumpSDoc
Ian Lynagh [Sun, 5 Jun 2011 13:09:53 +0000 (14:09 +0100)]
Make dumpIfSet_dyn_or use dumpSDoc

This means that for example
    ghc -ddump-simpl -ddump-to-file ...
now puts the simpl output in a file, rather htan sending it to stdout.

8 years agoadd comment
Simon Marlow [Sat, 4 Jun 2011 10:11:10 +0000 (11:11 +0100)]
add comment

8 years agocomment typo
Simon Marlow [Sat, 4 Jun 2011 10:10:49 +0000 (11:10 +0100)]
comment typo

8 years agoTidy up the ic_exports field of the InteractiveContext. Previously
Simon Marlow [Fri, 3 Jun 2011 23:13:04 +0000 (00:13 +0100)]
Tidy up the ic_exports field of the InteractiveContext.  Previously
was [(Module, Maybe ImportDecl)], now it is just [ImportDecl].  So now
":m +A" and "import A" do exactly the same thing in GHCi, and use the
same code paths.

8 years agoIgnore ghc-extra-opts
Manuel M T Chakravarty [Fri, 3 Jun 2011 02:13:21 +0000 (12:13 +1000)]
Ignore ghc-extra-opts

8 years agoHaddock fix in the vectoriser
Manuel M T Chakravarty [Fri, 3 Jun 2011 01:41:44 +0000 (11:41 +1000)]
Haddock fix in the vectoriser

8 years agoPropagate scalar variables and tycons for vectorisation through 'HscTypes.VectInfo'.
Manuel M T Chakravarty [Fri, 3 Jun 2011 00:42:48 +0000 (10:42 +1000)]
Propagate scalar variables and tycons for vectorisation through 'HscTypes.VectInfo'.

8 years agoadd support for flattening recursive-let
Adam Megacz [Thu, 2 Jun 2011 02:06:16 +0000 (19:06 -0700)]
add support for flattening recursive-let

8 years agofix comment
Simon Marlow [Tue, 31 May 2011 13:05:37 +0000 (14:05 +0100)]
fix comment

8 years agoFold constants during forward substitution in the Cmm mini-inliner
Johan Tibell [Fri, 6 May 2011 15:10:15 +0000 (17:10 +0200)]
Fold constants during forward substitution in the Cmm mini-inliner

This exposes new constants that can be propagated.

8 years agoImplement forward substitution of constants in the Cmm mini-inliner
Johan Tibell [Fri, 6 May 2011 12:13:03 +0000 (14:13 +0200)]
Implement forward substitution of constants in the Cmm mini-inliner

Currently the mini-inliner would only forward substitute assignments
to registers that were used exactly once, to not risk duplicating
computation.  For constants there's no such risk so we always
substitute.  Prior to the change the Cmm

    fn
    {
        bits64 a, b;

        a = 1;
        b = a + a;
        RET_N(b);
    }

would be optimized as

    fn()    { []
            }
        ca: _cb::I64 = 1;
            R1 = _cb::I64 + _cb::I64;
            jump (I64[Sp + 0]) ();
    }

but after it would be optimized as

    fn()    { []
            }
        ca: R1 = 2;
            jump (I64[Sp + 0]) ();
    }

Note that this pass does not deal with the now dead assignment.

8 years agocheck for bfd_uncompress_section_contents instead of bfd_init, because
Simon Marlow [Wed, 1 Jun 2011 08:58:21 +0000 (09:58 +0100)]
check for bfd_uncompress_section_contents instead of bfd_init, because
the former will fail if libbfd is a static library and has a libz
dependency that we don't know about (#3756)

8 years agoFix a warning in DEBUG code
Ian Lynagh [Wed, 1 Jun 2011 00:07:01 +0000 (01:07 +0100)]
Fix a warning in DEBUG code

8 years agoFix the build with GHC 6.12.3
Ian Lynagh [Tue, 31 May 2011 23:50:24 +0000 (00:50 +0100)]
Fix the build with GHC 6.12.3

8 years agoFix a build failure on non-{x86,amd64}
Ian Lynagh [Tue, 31 May 2011 23:20:08 +0000 (00:20 +0100)]
Fix a build failure on non-{x86,amd64}

8 years agodesugar: do not bother simplifying if we are doing simpleopt-before-flatten
Adam Megacz [Tue, 31 May 2011 22:04:01 +0000 (15:04 -0700)]
desugar: do not bother simplifying if we are doing simpleopt-before-flatten

8 years agoEliminate IF_ARCH_sparc
Ian Lynagh [Tue, 31 May 2011 21:15:33 +0000 (22:15 +0100)]
Eliminate IF_ARCH_sparc

8 years agoRemove some unused CPP macros
Ian Lynagh [Tue, 31 May 2011 21:09:22 +0000 (22:09 +0100)]
Remove some unused CPP macros

8 years agoRemove CPP from nativeGen/RegAlloc/Linear/FreeRegs.hs
Ian Lynagh [Tue, 31 May 2011 18:02:52 +0000 (19:02 +0100)]
Remove CPP from nativeGen/RegAlloc/Linear/FreeRegs.hs

Fixes more failures on arches without an NCG

8 years agoParameterise the RegM monad on the FreeRegs type
Ian Lynagh [Tue, 31 May 2011 16:07:04 +0000 (17:07 +0100)]
Parameterise the RegM monad on the FreeRegs type