| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We previously did a wholesale replace of `%function` to `%object` to
mangle object `.type` annotations. This is bad as it can end up
replacing appearances of `"%function"` in the user's code. We now look
for a proper `.type` keyword before performing the replacement.
Thanks to @rwbarton for pointing out the bug.
Test Plan:
Previously,
$ echo 'main = putStrLn "@function"' > test.hs
$ ghc -fllvm test.hs
$ ./test
@object
Now,
$ echo 'main = putStrLn "@function"' > test.hs
$ ghc -fllvm test.hs
$ ./test
@function
Reviewers: rwbarton, austin
Reviewed By: rwbarton, austin
Subscribers: phaskell, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D150
GHC Trac Issues: #9439
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been
reorganized, while following the convention, to
- place `{-# LANGUAGE #-}` pragmas at the top of the source file, before
any `{-# OPTIONS_GHC #-}`-lines.
- Moreover, if the list of language extensions fit into a single
`{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one
line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each
individual language extension. In both cases, try to keep the
enumeration alphabetically ordered.
(The latter layout is preferable as it's more diff-friendly)
While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma
occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
| |
Previously a few symbols weren't flipped from %function to %object
as the section splitter was emitting them without processes. This
may be a bug in itself but for now let's just work around the issue
but rewriting all symbol `.types`.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
| |
This was pretty badly broken...
Authored-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
We now manage the stack correctly on both x86 and i386, keeping
the stack align at (16n bytes - word size) on function entry
and at (16n bytes) on function calls. This gives us compatability
with LLVM and GCC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the STG code so that %rsp to be aligned
to a 16-byte boundary + 8. This is the alignment required by
the x86_64 ABI on entry to a function. Previously we kept
%rsp aligned to a 16-byte boundary, but this was causing
problems for the LLVM backend (see #4211).
We now don't need to invoke llvm stack mangler on
x86_64 targets. Since the stack is now 16+8 byte algined in
STG land on x86_64, we don't need to mangle the stack
manipulations with the llvm mangler.
This patch only modifies the alignement for x86_64 backends.
Signed-off-by: David Terei <davidterei@gmail.com>
|
| |
|
|
|
|
|
|
| |
This is the Stephen Blackheath's GHC/ARM registerised port
which is using modified version of LLVM and which provides
basic registerised build functionality
|
|
|
|
| |
Patch by Peter Wortmann!
|
| |
|
|
|
|
| |
Patch by Peter Wortmann!
|
|
|
|
|
| |
Instead of using the GNU As subsection feature on Linux/Windows
for TNTC we now use the LLVM Mangler on all platforms.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The old llvm mangler was horrible! Very slow
due to bad design and code. New version is
linear complexity as it should be and far
lower coefficients. This fixes trac 4838.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|