ghc.git
6 years agoAdd TH support for annotations (#8340)
Austin Seipp [Wed, 2 Oct 2013 02:07:44 +0000 (21:07 -0500)] 
Add TH support for annotations (#8340)

Authored-by: Gergely Risko <gergely@risko.hu>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agofingerprint.py: Invoke 'perl' manually (#8283)
Muhaimin Ahsan [Fri, 13 Sep 2013 06:26:32 +0000 (01:26 -0500)] 
fingerprint.py: Invoke 'perl' manually (#8283)

This fixes the fingerprint script on windows, since we can't rely on
using '#!/usr/bin/perl'

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoPersist annotations to interface files (#3725)
Austin Seipp [Wed, 2 Oct 2013 01:49:52 +0000 (20:49 -0500)] 
Persist annotations to interface files (#3725)

Authored-by: Gergely Risko <gergely@risko.hu>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoDelete old comments referring to newSession
Austin Seipp [Wed, 2 Oct 2013 01:48:21 +0000 (20:48 -0500)] 
Delete old comments referring to newSession

As Herbert pointed it, it was removed a long time ago.

Authored-by: Kazu Yamamoto <kazu@iij.ad.jp>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoTypos in comments
Gabor Greif [Tue, 1 Oct 2013 19:44:23 +0000 (21:44 +0200)] 
Typos in comments

6 years agoImprove error message for fundeps a bit more
Simon Peyton Jones [Tue, 1 Oct 2013 18:20:21 +0000 (19:20 +0100)] 
Improve error message for fundeps a bit more

6 years agoWhite space and line endings
Simon Peyton Jones [Tue, 1 Oct 2013 18:20:03 +0000 (19:20 +0100)] 
White space and line endings

6 years agoWibble (change of flag name)
Simon Peyton Jones [Tue, 1 Oct 2013 18:18:53 +0000 (19:18 +0100)] 
Wibble (change of flag name)

6 years agoDocumentation for -fprint-explicit-foralls and -fprint-explicit-kinds
Simon Peyton Jones [Tue, 1 Oct 2013 18:18:27 +0000 (19:18 +0100)] 
Documentation for -fprint-explicit-foralls and -fprint-explicit-kinds

Plus a tidy-up of the flag documentation in the immediate area

6 years agoRemove trailing whitespace and tabs
Simon Peyton Jones [Tue, 1 Oct 2013 17:15:07 +0000 (18:15 +0100)] 
Remove trailing whitespace and tabs

6 years agoImprove pretty-printing of types
unknown [Tue, 1 Oct 2013 15:34:00 +0000 (16:34 +0100)] 
Improve pretty-printing of types

* The main change is to suppress printing (in types) of
     kind for-alls
     kind applications
  The new flag -fprint-explicit-kinds prints them as before
  (by analogy with the existing -fprint-explicit-foralls)

* I also took advantage of the fact that SDoc now has access
  to DynFlags, to tidy up the way in which explicit for-alls
  are printed.  Instead of passing a boolean flag around, we
  now simply consult the DynFlags.  Much neater.

I still need to add documentation for the flag

6 years agoImprove error reporting of fundep coverage condition failure
unknown [Sat, 28 Sep 2013 16:08:37 +0000 (17:08 +0100)] 
Improve error reporting of fundep coverage condition failure

This modest improvement is motivated by Trac #8356

6 years agoLook inside tuple predicates when checking instance declaration contexts
unknown [Thu, 26 Sep 2013 18:10:04 +0000 (19:10 +0100)] 
Look inside tuple predicates when checking instance declaration contexts

This fixes Trac #8359

6 years agoComments only
unknown [Tue, 24 Sep 2013 19:01:52 +0000 (20:01 +0100)] 
Comments only

6 years agoMove defaultClassMinimalDef from BuildTyCl to TcClassDcl
unknown [Tue, 24 Sep 2013 19:01:31 +0000 (20:01 +0100)] 
Move defaultClassMinimalDef from BuildTyCl to TcClassDcl

Simple refactoring.

Also in Vectorise.Types/TyConDecl, simply propagate the classMinimalDef
from the class we are vectorising. Simpler and more direct.

6 years agoComments only
unknown [Tue, 24 Sep 2013 18:59:25 +0000 (19:59 +0100)] 
Comments only

6 years agoBetter docs for MINIMAL
unknown [Mon, 23 Sep 2013 03:39:02 +0000 (04:39 +0100)] 
Better docs for MINIMAL

6 years agoLift an unnecessary assumption in the demand analyser (fix Trac #8329)
Simon Peyton Jones [Tue, 1 Oct 2013 08:27:53 +0000 (09:27 +0100)] 
Lift an unnecessary assumption in the demand analyser (fix Trac #8329)

Here's the Note about the (simple) fix.  Apparently #8329 prevented all
23 packages of the Snap framework from compiling.

Note [Demand transformer for a ditionary selector]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we evaluate (op dict-expr) under demand 'd', then we can push the demand 'd'
into the appropriate field of the dictionary. What *is* the appropriate field?
We just look at the strictness signature of the class op, which will be
something like: U(AAASAAAAA).  Then replace the 'S' by the demand 'd'.

For single-method classes, which are represented by newtypes the signature
of 'op' won't look like U(...), so the splitProdDmd_maybe will fail.
That's fine: if we are doing strictness analysis we are also doing inling,
so we'll have inlined 'op' into a cast.  So we can bale out in a conservative
way, returning topDmdType.

It is (just.. Trac #8329) possible to be running strictness analysis *without*
having inlined class ops from single-method classes.  Suppose you are using
ghc --make; and the first module has a local -O0 flag.  So you may load a class
without interface pragmas, ie (currently) without an unfolding for the class
ops.   Now if a subsequent module in the --make sweep has a local -O flag
you might do strictness analysis, but there is no inlining for the class op.
This is wierd so I'm not worried about whether this optimises brilliantly; but
it should not fall over.

6 years agocomment update
Simon Marlow [Fri, 27 Sep 2013 19:59:49 +0000 (20:59 +0100)] 
comment update

6 years agoAdd layout to MultiWayIf (#7783)
Simon Marlow [Fri, 27 Sep 2013 19:59:41 +0000 (20:59 +0100)] 
Add layout to MultiWayIf (#7783)

This makes it possible to write

x = if | False -> if | False -> 1
                     | False -> 2
       | True -> 3

Layout normally inserts semicolons between declarations at the same
indentation level, so I added optional semicolons to the syntax for
guards in MultiWayIf syntax.  This is a bit of a hack, but the
alternative (a special kind of layout that doesn't insert semicolons)
seemed worse, or at least equally bad.

6 years agoAdd back a comment that got lost
Simon Marlow [Thu, 26 Sep 2013 16:10:26 +0000 (17:10 +0100)] 
Add back a comment that got lost

6 years agoClarification in the docs for INLINE
Simon Marlow [Thu, 26 Sep 2013 15:28:34 +0000 (16:28 +0100)] 
Clarification in the docs for INLINE

People often jump to the conclusion that functions aren't inlined
unless you say INLINE, so clarify the documentation to emphasize the
fact that you shouldn't normally need to use INLINE unless you need to
override the defaults.

6 years agoRemove a couple of unnecessary/outdated references to HBC
Simon Marlow [Thu, 26 Sep 2013 15:06:14 +0000 (16:06 +0100)] 
Remove a couple of unnecessary/outdated references to HBC

6 years agogrammar fix
Simon Marlow [Mon, 23 Sep 2013 15:05:19 +0000 (16:05 +0100)] 
grammar fix

6 years agoGlobally replace "hackage.haskell.org" with "ghc.haskell.org"
Simon Marlow [Mon, 23 Sep 2013 15:03:44 +0000 (16:03 +0100)] 
Globally replace "hackage.haskell.org" with "ghc.haskell.org"

6 years agouse StgWord not StgWord8 for wakeup
Simon Marlow [Tue, 17 Sep 2013 20:49:53 +0000 (21:49 +0100)] 
use StgWord not StgWord8 for wakeup

volatile StgWord8 is not guaranteed to be atomic.

6 years agouse a nat, not StgWord8, for gc_type
Simon Marlow [Tue, 17 Sep 2013 20:48:55 +0000 (21:48 +0100)] 
use a nat, not StgWord8, for gc_type

6 years agoRemove use of R9, and fix associated bugs
Simon Marlow [Tue, 17 Sep 2013 20:48:39 +0000 (21:48 +0100)] 
Remove use of R9, and fix associated bugs

We were passing the function address to stg_gc_prim_p in R9, which was
wrong because the call was a high-level call and didn't declare R9 as
a parameter.  Passing R9 as an argument is the right way, but
unfortunately that exposed another bug: we were using the same macro
in some low-level Cmm, where it is illegal to call functions with
arguments (see Note [syntax of cmm files]).  So we now have low-level
variants of STK_CHK() and STK_CHK_P() for use in low-level Cmm code.

6 years agoExpand the commentary in Note [syntax of cmm files]
Simon Marlow [Tue, 17 Sep 2013 20:42:54 +0000 (21:42 +0100)] 
Expand the commentary in Note [syntax of cmm files]

6 years agoTypos in users' guide
Krzysztof Gogolewski [Tue, 1 Oct 2013 09:44:00 +0000 (11:44 +0200)] 
Typos in users' guide

6 years agoCompare against pRELUDE_NAME instead of "Prelude"
Patrick Palka [Mon, 30 Sep 2013 19:15:42 +0000 (15:15 -0400)] 
Compare against pRELUDE_NAME instead of "Prelude"

6 years agoFix AMP warnings for explicit Prelude imports (#8004)
Austin Seipp [Sun, 29 Sep 2013 23:12:13 +0000 (18:12 -0500)] 
Fix AMP warnings for explicit Prelude imports (#8004)

No AMP warnings will be issued anymore when the name is not imported
from Prelude anymore. For example, a local definition of 'join' is now
legal in modules containing 'import Prelude (map)' for example. This
allows better future-proofing of libraries.

See also http://ghc.haskell.org/trac/ghc/ticket/8004#comment:16

Authored-by: David Luposchainsky <dluposchainsky@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoMention the Foldable and Traversable instances for Const r in the user guide
Edward Kmett [Fri, 27 Sep 2013 18:20:45 +0000 (14:20 -0400)] 
Mention the Foldable and Traversable instances for Const r in the user guide

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoAdd a note about Proxy# to the user guide
Edward Kmett [Fri, 27 Sep 2013 18:37:26 +0000 (14:37 -0400)] 
Add a note about Proxy# to the user guide

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoRemove extra space in LIBFFI_CFLAGS (#8349)
Peter Trommler [Sun, 22 Sep 2013 16:55:54 +0000 (18:55 +0200)] 
Remove extra space in LIBFFI_CFLAGS (#8349)

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoFix BCO bitmap generation on 32-bit platforms (#8377)
Takano Akio [Sat, 28 Sep 2013 08:45:47 +0000 (17:45 +0900)] 
Fix BCO bitmap generation on 32-bit platforms (#8377)

On 32-bit platforms, the bitmap should be an array of
32-bit words, not Word64s.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoMake lazy unlifted bindings an error by default.
Austin Seipp [Tue, 10 Sep 2013 02:50:52 +0000 (21:50 -0500)] 
Make lazy unlifted bindings an error by default.

This was supposed to happen a long time ago, but later is better than
never. This makes `-fwarn-lazy-unlifted-bindings` into a no-op (with its
own warning) to be removed in GHC 7.10.

This fixes #8022.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoTeach sync-all how to rewrite submodule repo urls
Herbert Valerio Riedel [Sat, 28 Sep 2013 08:15:21 +0000 (10:15 +0200)] 
Teach sync-all how to rewrite submodule repo urls

This applies attachment:sync-all-submodules-locally.diff from #8369

Authored-by: Nathaniel Filardo
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoFix typo in sync-all script. (#8375)
Muhaimin Ahsan [Sat, 28 Sep 2013 04:44:58 +0000 (23:44 -0500)] 
Fix typo in sync-all script. (#8375)

6 years agoRnNames.lhs : Reuse existing function.
Erik de Castro Lopo [Fri, 27 Sep 2013 18:50:54 +0000 (04:50 +1000)] 
RnNames.lhs : Reuse existing function.

6 years agoWhitespace only.
Erik de Castro Lopo [Mon, 23 Sep 2013 19:09:02 +0000 (05:09 +1000)] 
Whitespace only.

6 years agoRelease notes: mention -XEmptyCase
Krzysztof Gogolewski [Fri, 27 Sep 2013 06:57:55 +0000 (08:57 +0200)] 
Release notes: mention -XEmptyCase

6 years agoFix manual regarding current state of implicit quantification
Krzysztof Gogolewski [Fri, 27 Sep 2013 06:55:44 +0000 (08:55 +0200)] 
Fix manual regarding current state of implicit quantification

See also #4426

6 years agoMake typeRep_RDR use typeRep# instead of typeRep
Austin Seipp [Thu, 26 Sep 2013 06:42:51 +0000 (01:42 -0500)] 
Make typeRep_RDR use typeRep# instead of typeRep

Authored-by: Edward Kmett <ekmett@gmail.com>
Authored-by: Austin Seipp <austin@well-typed.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoImplement an unlifted Proxy type, Proxy#
Austin Seipp [Wed, 25 Sep 2013 07:42:21 +0000 (02:42 -0500)] 
Implement an unlifted Proxy type, Proxy#

A value of type 'Proxy# a' can only be created through the new,
primitive witness 'proxy# :: Proxy# a' - a Proxy# has no runtime
representation and is thus free.

This lets us clean up the internals of TypeRep, as well as Adam's future
work concerning records (by using a zero-width primitive type.)

Authored-by: Edward Kmett <ekmett@gmail.com>
Authored-by: Austin Seipp <austin@well-typed.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoUpdate `primitive` and `vector` packages
Herbert Valerio Riedel [Thu, 26 Sep 2013 09:58:25 +0000 (11:58 +0200)] 
Update `primitive` and `vector` packages

 - `primitive` is updated to upstream's HEAD which is essentially
   `primitive-0.5.1.0`, plus a core-lint-error workaround for #8355 and
   some minor cleanups.

 - `vector` is updated to upstreams `vector-0.10.9.1` release

Note: The upstream repo location has changed to GitHub,
      hence the update in the `packages` file

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoFix user guide documentation about unboxed values
Arash Rouhani [Tue, 24 Sep 2013 20:06:18 +0000 (22:06 +0200)] 
Fix user guide documentation about unboxed values

Signed-off-by: Arash Rouhani <rarash@student.chalmers.se>
6 years agoTypo in comment
Gabor Greif [Mon, 23 Sep 2013 19:58:22 +0000 (21:58 +0200)] 
Typo in comment

6 years agoAdd a type-function for subtraction.
Iavor S. Diatchki [Tue, 24 Sep 2013 13:14:15 +0000 (06:14 -0700)] 
Add a type-function for subtraction.

This is used in the definition of `ToNat1` in the `base` library
(module GHC.TypeLits).

6 years agoRelease notes: mention instance Monad (WrappedMonad m) (#8218)
Krzysztof Gogolewski [Mon, 23 Sep 2013 16:21:22 +0000 (18:21 +0200)] 
Release notes: mention instance Monad (WrappedMonad m) (#8218)

6 years agoFix build when PROF_SPIN is unset
Patrick Palka [Sat, 29 Jun 2013 23:58:28 +0000 (19:58 -0400)] 
Fix build when PROF_SPIN is unset

whitehole_spin is only defined when PROF_SPIN is set.

6 years agoFix the definition of cas() on x86 (#8219)
Patrick Palka [Sat, 21 Sep 2013 17:27:13 +0000 (13:27 -0400)] 
Fix the definition of cas() on x86 (#8219)

*p is both read and written to by the cmpxchg instruction, and therefore
should be given the '+' constraint modifier.

(In GCC's extended ASM language, '+' means that the operand is both read
and written to whereas '=' means that it is only written to.)

Otherwise, the compiler is allowed to rewrite something like

SpinLock lock;
initSpinLock(&lock);       /* sets lock = 1 */
ACQUIRE_SPIN_LOCK(&lock);

into

SpinLock lock;
ACQUIRE_SPIN_LOCK(&lock);

because according to the asm statement, the previous value of 'lock' is
not important.

6 years agoRemove fglasgow-exts from ghci --help
Krzysztof Gogolewski [Mon, 23 Sep 2013 11:43:47 +0000 (13:43 +0200)] 
Remove fglasgow-exts from ghci --help

It has been deprecated for long and already removed from ghc --help

6 years agoFix linker_unload now that we are running constructors in the linker (#8291)
Simon Marlow [Sun, 22 Sep 2013 12:08:01 +0000 (13:08 +0100)] 
Fix linker_unload now that we are running constructors in the linker (#8291)

See also #5435.

Now we have to remember the the StablePtrs that get created by the
module initializer so that we can free them again in unloadObj().

6 years agoDiscard unreachable code in the register allocator (#7574)
Simon Marlow [Sat, 21 Sep 2013 17:32:33 +0000 (18:32 +0100)] 
Discard unreachable code in the register allocator (#7574)

The problem with unreachable code is that it might refer to undefined
registers.  This happens accidentally: a block can be orphaned by an
optimisation, for example when the result of a comparsion becomes
known.

The register allocator panics when it finds an undefined register,
because they shouldn't occur in generated code.  So we need to also
discard unreachable code to prevent this panic being triggered by
optimisations.

The register alloator already does a strongly-connected component
analysis, so it ought to be easy to make it discard unreachable code
as part of that traversal.  It turns out that we need a different
variant of the scc algorithm to do that (see Digraph), however the new
variant also generates slightly better code by putting the blocks
within a loop in a better order for register allocation.

6 years agoTypos
Krzysztof Gogolewski [Mon, 23 Sep 2013 09:28:36 +0000 (11:28 +0200)] 
Typos

6 years agoCatch potential garbage after -msse.
Geoffrey Mainland [Mon, 23 Sep 2013 04:40:59 +0000 (00:40 -0400)] 
Catch potential garbage after -msse.

6 years agoMerge branch 'wip/simd'
Geoffrey Mainland [Mon, 23 Sep 2013 04:22:19 +0000 (00:22 -0400)] 
Merge branch 'wip/simd'

This merge revises and extends the current SIMD support in GHC. Notable
features:

 * Support for AVX, AVX2, and AVX-512. Support for AVX-512 is untested.

 * SIMD primops are currently LLVM-only and documented in
   compiler/prelude/primops.txt.pp.

 * By default only 128-bit wide SIMD vectors are passed in registers, and then
   only on the X86_64 architecture. There is a "hidden" flag,
   -fllvm-pass-vectors-in-regs, that causes GHC to generate LLVM code that
   assumes all vectors are passed in registers by LLVM. This can be used with a
   suitably patched version of LLVM, and if we get LLVM 3.4 patched, we can
   consider turning it on by default for LLVM 3.4+. This would mean that we
   couldn't mix LLVM <3.4-compiled object files with LLVM >=3.4-compiled object
   files, but I don't see that as much of a problem.

 * utils/genprimcode has been hacked up to allow us to write vector operations
   once and have them instantiated at multiple vector types. I'm not thrilled
   with this solution, but after discussing with Simon PJ, what I've implemented
   seems to be the minimal reasonable solution to the problem of exploding
   primop boilerplate. The changes are documented in
   compiler/prelude/primops.txt.pp.

 * Error handling is sub-optimal. My patch checks to make sure that vector
   primops can be compiled efficiently based on the current set of dynamic
   flags. For example, if -mavx is not specified and the user tries to use a
   primop that adds together two 256-bit wide vectors of double-precision
   elements, the user will see an error message like:

     ghc-stage2: sorry! (unimplemented feature or known bug)
       (GHC version 7.7.20130916 for x86_64-unknown-linux):
 256-bit wide floating point SIMD vector instructions require at least -mavx.

6 years agoCheck that SIMD vector instructions are compatible with current set of dynamic flags.
Geoffrey Mainland [Mon, 16 Sep 2013 16:48:30 +0000 (12:48 -0400)] 
Check that SIMD vector instructions are compatible with current set of dynamic flags.

SIMD vector instructions currently require the LLVM back-end. The set of
available instructions also depends on the set of architecture flags specified
on the command line.

6 years agoEnable -msse to be specified by itself.
Geoffrey Mainland [Mon, 16 Sep 2013 16:27:37 +0000 (12:27 -0400)] 
Enable -msse to be specified by itself.

This sets the SSE "version" to 1.0.

6 years agoBy default, only pass 128-bit SIMD vectors in registers on X86-64.
Geoffrey Mainland [Mon, 16 Sep 2013 03:43:29 +0000 (23:43 -0400)] 
By default, only pass 128-bit SIMD vectors in registers on X86-64.

LLVM's GHC calling convention only allows 128-bit SIMD vectors to be passed in
machine registers on X86-64. This may change in LLVM 3.4; the hidden flag
-fllvm-pass-vectors-in-regs causes all SIMD vector widths to be passed in
registers on both X86-64 and on X86-32.

6 years agoAdd 512-bit-wide SIMD primitives.
Geoffrey Mainland [Mon, 16 Sep 2013 02:53:39 +0000 (22:53 -0400)] 
Add 512-bit-wide SIMD primitives.

6 years agoPass 512-bit-wide vectors in registers.
Geoffrey Mainland [Mon, 16 Sep 2013 02:41:31 +0000 (22:41 -0400)] 
Pass 512-bit-wide vectors in registers.

6 years agoAdd support for 512-bit-wide vectors.
Geoffrey Mainland [Sun, 15 Sep 2013 21:20:09 +0000 (17:20 -0400)] 
Add support for 512-bit-wide vectors.

6 years agoAdd Cmm support for 512-bit-wide values.
Geoffrey Mainland [Sun, 15 Sep 2013 20:34:23 +0000 (16:34 -0400)] 
Add Cmm support for 512-bit-wide values.

6 years agoAdd support for -mavx512* flags.
Geoffrey Mainland [Sun, 15 Sep 2013 20:24:04 +0000 (16:24 -0400)] 
Add support for -mavx512* flags.

6 years agoAdd 256-bit-wide SIMD primitives.
Geoffrey Mainland [Thu, 22 Aug 2013 10:03:46 +0000 (11:03 +0100)] 
Add 256-bit-wide SIMD primitives.

6 years agoPass 256-bit-wide vectors in registers.
Geoffrey Mainland [Thu, 14 Feb 2013 23:28:39 +0000 (23:28 +0000)] 
Pass 256-bit-wide vectors in registers.

6 years agoFixup stack spills when generating AVX instructions.
Geoffrey Mainland [Sat, 26 Nov 2011 12:45:23 +0000 (12:45 +0000)] 
Fixup stack spills when generating AVX instructions.

LLVM uses aligned AVX moves to spill values onto the stack, which requires
32-bye aligned stacks. Since the stack in only 16-byte aligned, LLVM inserts
extra instructions that munge the stack pointer. This is very very bad for the
GHC calling convention, so we tell LLVM to assume the stack is 32-byte
aligned. This patch rewrites the spill instructions that LLVM generates so they
do not require an aligned stack.

6 years agoSet LLVM option -stack-alignment=32 when compiling AVX instructions.
Geoffrey Mainland [Thu, 14 Feb 2013 21:25:54 +0000 (21:25 +0000)] 
Set LLVM option -stack-alignment=32 when compiling AVX instructions.

6 years agoAdd support for 256-bit-wide vectors.
Geoffrey Mainland [Thu, 14 Feb 2013 18:52:00 +0000 (18:52 +0000)] 
Add support for 256-bit-wide vectors.

6 years agoAdd Cmm support for 256-bit-wide values.
Geoffrey Mainland [Thu, 14 Feb 2013 18:48:25 +0000 (18:48 +0000)] 
Add Cmm support for 256-bit-wide values.

6 years agoAdd support for -mavx and -mavx2 flags.
Geoffrey Mainland [Wed, 13 Feb 2013 16:33:01 +0000 (16:33 +0000)] 
Add support for -mavx and -mavx2 flags.

6 years agoFlesh out 128-bit wide SIMD primops.
Geoffrey Mainland [Wed, 21 Aug 2013 15:55:26 +0000 (16:55 +0100)] 
Flesh out 128-bit wide SIMD primops.

6 years agoSIMD primops are now generated using schemas that are polymorphic in
Geoffrey Mainland [Wed, 21 Aug 2013 15:18:24 +0000 (16:18 +0100)] 
SIMD primops are now generated using schemas that are polymorphic in
width and element type.

SIMD primops are now polymorphic in vector size and element type, but
only internally to the compiler. More specifically, utils/genprimopcode
has been extended so that it "knows" about SIMD vectors. This allows us
to, for example, write a single definition for the "add two vectors"
primop in primops.txt.pp and have it instantiated at many vector types.
This generates a primop in GHC.Prim for each vector type at which "add
two vectors" is instantiated, but only one data constructor for the
PrimOp data type, so the code generator is much, much simpler.

6 years agoDo not expose LLVM-only primops in GHC.PrimopWrappers.
Geoffrey Mainland [Wed, 21 Aug 2013 11:57:54 +0000 (12:57 +0100)] 
Do not expose LLVM-only primops in GHC.PrimopWrappers.

GHC.PrimopWrappers is only used by GHCi, which cannot evaluate LLVM-only
primops in any case.

6 years agoEnable passing vector arguments in xmm registers on x86-32.
Geoffrey Mainland [Thu, 8 Aug 2013 14:59:42 +0000 (15:59 +0100)] 
Enable passing vector arguments in xmm registers on x86-32.

Note that this will only work with the LLVM back end pending LLVM patches to
change the GHC calling convention appropriately.

6 years agoDo not assume that XMM registers are used to pass floating point arguments.
Geoffrey Mainland [Thu, 8 Aug 2013 14:58:42 +0000 (15:58 +0100)] 
Do not assume that XMM registers are used to pass floating point arguments.

On x86-32, the C calling convention specifies that when SSE2 is enabled, vector
arguments are passed in xmm* registers; however, float and double arguments are
still passed on the stack. This patch allows us to make the same choice for
GHC. Even when SSE2 is enabled, we don't want to pass Float and Double arguments
in registers because this would change the ABI and break the ability to link
with code that was compiled without -msse2.

The next patch will enable passing vector arguments in xmm registers on x86-32.

6 years agoEnsure that globalRegMaybe returns accurate information for XMM registers.
Geoffrey Mainland [Fri, 13 Sep 2013 16:00:05 +0000 (12:00 -0400)] 
Ensure that globalRegMaybe returns accurate information for XMM registers.

6 years agoRelease note blurb.
Austin Seipp [Mon, 23 Sep 2013 01:10:31 +0000 (20:10 -0500)] 
Release note blurb.

GHCi now runs constructors for linked libraries.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoRestructure compilation pipeline to allow hooks
Austin Seipp [Sun, 22 Sep 2013 23:47:35 +0000 (18:47 -0500)] 
Restructure compilation pipeline to allow hooks

This commit exposes GHC's internal compiler pipeline through a `Hooks`
module in the GHC API. It currently allows you to hook:

 * Foreign import/exports declarations
 * The frontend up to type checking
 * The one shot compilation mode
 * Core compilation, and the module iface
 * Linking and the phases in DriverPhases.hs
 * Quasiquotation

Authored-by: Luite Stegeman <stegeman@gmail.com>
Authored-by: Edsko de Vries <edsko@well-typed.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agousers_guide/ghci: Whitespace cleanup (#7501)
Ben Gamari [Fri, 20 Sep 2013 21:08:00 +0000 (17:08 -0400)] 
users_guide/ghci: Whitespace cleanup (#7501)

6 years agoDocument remaining GHCi commands in users_guide (#7501)
Ben Gamari [Fri, 20 Sep 2013 18:28:51 +0000 (14:28 -0400)] 
Document remaining GHCi commands in users_guide (#7501)

Also a small formatting change in GHCi :help

6 years agoAdd release note entry for `{-# MINIMAL #-}` (#7633)
Herbert Valerio Riedel [Thu, 19 Sep 2013 08:54:47 +0000 (10:54 +0200)] 
Add release note entry for `{-# MINIMAL #-}` (#7633)

6 years agoDocument more stolen syntax (#4196)
Krzysztof Gogolewski [Sat, 21 Sep 2013 06:24:11 +0000 (08:24 +0200)] 
Document more stolen syntax (#4196)

6 years agoFix name of vanilla RTS way in the user's guide
Reid Barton [Thu, 12 Sep 2013 17:21:10 +0000 (13:21 -0400)] 
Fix name of vanilla RTS way in the user's guide

6 years agoTypos
Krzysztof Gogolewski [Fri, 20 Sep 2013 20:23:49 +0000 (22:23 +0200)] 
Typos

6 years agoUpdate `Cabal` to 1.18.1 final
Herbert Valerio Riedel [Fri, 20 Sep 2013 18:49:25 +0000 (20:49 +0200)] 
Update `Cabal` to 1.18.1 final

6 years agoComments only
Jan Stolarek [Fri, 20 Sep 2013 14:24:52 +0000 (15:24 +0100)] 
Comments only

6 years agoImprove error message for deriving polykinded Typeable (Trac #7800)
Simon Peyton Jones [Fri, 20 Sep 2013 13:51:41 +0000 (14:51 +0100)] 
Improve error message for deriving polykinded Typeable (Trac #7800)

Thanks to Krzysztof Gogolewski (monoidal) for the first draft of this patch

6 years agoNuke tc-trace that makes the typechecker loop
Simon Peyton Jones [Fri, 20 Sep 2013 13:50:32 +0000 (14:50 +0100)] 
Nuke tc-trace that makes the typechecker loop

The trace was being over-eager, which disturbs the typecheckers
careful knot-tying

6 years agoKill Type.isKindTy in favour of Kind.isKind (same code)
Simon Peyton Jones [Fri, 20 Sep 2013 13:49:36 +0000 (14:49 +0100)] 
Kill Type.isKindTy in favour of Kind.isKind (same code)

6 years agoRefactor AMP warnings a bit
Simon Peyton Jones [Fri, 20 Sep 2013 13:48:47 +0000 (14:48 +0100)] 
Refactor AMP warnings a bit

There was a bit of clutter (tryTc stuff) caused by the
fact that tcLookupImported didn't return a MaybeErr.
Now it does.  That finishes up Trac #8004.

6 years agoIgnore Tickish Breakpoints when serialising Core into interface files
Simon Peyton Jones [Fri, 20 Sep 2013 13:46:13 +0000 (14:46 +0100)] 
Ignore Tickish Breakpoints when serialising Core into interface files

This fixes Trac #8333

Thanks to 'klao', who identified the cause and provided the patch

6 years agoComments only
Jan Stolarek [Thu, 19 Sep 2013 10:48:00 +0000 (11:48 +0100)] 
Comments only

6 years agoUpdate release notes for new comparison primops
Jan Stolarek [Thu, 19 Sep 2013 09:50:10 +0000 (10:50 +0100)] 
Update release notes for new comparison primops

6 years agoDocument -floopification flag in user guide
Jan Stolarek [Thu, 19 Sep 2013 09:40:08 +0000 (10:40 +0100)] 
Document -floopification flag in user guide

6 years agoRemove trailing whitespaces in flags.xml
Jan Stolarek [Thu, 19 Sep 2013 09:39:32 +0000 (10:39 +0100)] 
Remove trailing whitespaces in flags.xml

6 years agoFix egregious blunder in extractRelevantInerts
Simon Peyton Jones [Wed, 18 Sep 2013 15:20:28 +0000 (16:20 +0100)] 
Fix egregious blunder in extractRelevantInerts

6 years agoMake Word# a wired-in TyCon (fix Trac #8280)
Simon Peyton Jones [Wed, 18 Sep 2013 11:37:33 +0000 (12:37 +0100)] 
Make Word# a wired-in TyCon (fix Trac #8280)

wordTyCon was treated as wired-in, but
  * It didn't have a WiredInName
  * It didn't appear in the list of wiredInTyCons

I'm not sure how anything worked!