Fix build on Win64

gcc thought that fourthFloating could be used without being defined.
In actual fact it couldn't, but I've refactored the code so that it
can now see this.
Fix bumpTickyLitBy[E] on Win64; fixes #7940

A comment claimed that the ticky counters are unsigned longs, but
as far as I can see that isn't the case: They're already word-sized
values.
Track haskeline Win64 fix
Change the ranlib detection

On Windows, the ranlib in the path may not be the right ranlib (it may
be the 32bit ranlib when we are making a Win64 compiler, or vice-versa).
Therefore we can't leave it up to libffi to detect the right ranlib, but
need to tell it which ranlib to use. This means that we need to find
ranlib even if we don't actually need it ourselves.
Merge branch 'master' of http://darcs.haskell.org/ghc
Comment out a leftover pprTrace
include FastString.string_table in CoreMonad.reinitializeGlobals
copy the plugin's FastStringTable changes back into the host compiler
Fix llvm.prefetch instrinct for old LLVM versions

Seems the last parameter to llvm.prefectch was added in LLVM 3.0.

Signed-off-by: David Terei <davidterei@gmail.com>
Always have LLVM optimize globals

This pass is pretty cheap and eliminates the aliases generated by the LLVM
backend. This in turn is required for dynamic linking to work correctly,
as LLVM fails to properly attribute calls to aliased addresses.

Signed-off-by: David Terei <davidterei@gmail.com>
Remove spurious extra brace in LLVM metadata

This actually caused a segfault in the optimized stage 2 compiler due to
wrong TBAA data.

Signed-off-by: David Terei <davidterei@gmail.com>
Avoid needlessly splitting a UniqSupply when extracting a Unique (#8041)

In many places, 'splitUniqSupply' + 'uniqFromSupply' is used to split a
UniqSupply into a Unique and a new UniqSupply. In such places we should
instead use the more efficient and more appropriate
'takeUniqFromSupply' (or equivalent).

Not only is the former method slower, it also generates and throws away
an extra Unique.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Fix segfault with STM; fixes #8035. Patch from errge.
emacs-friendly completion command for ghci; part of #5687. Patch from hvr.
Docs for ghci completion command for ghci; part of #5687. Patch from hvr.
Alpha rename some functions for consistency
Fix build
Disable executable stack for the linker note, fixing #703 (again)

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Merge branch 'master' of http://darcs.haskell.org/ghc
Implement atomicReadMVar, fixing #4001.

We add the invariant to the MVar blocked threads queue that
threads blocked on an atomic read are always at the front of
the queue.  This invariant is easy to maintain, since takers
are only ever added to the end of the queue.

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