diff options
author | Peter Wortmann <scpmw@leeds.ac.uk> | 2013-06-26 15:45:16 +0100 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2013-06-27 13:39:11 -0700 |
commit | a948fe838bc79363d7565033d6ee42bf24d52fdc (patch) | |
tree | 22660c80d3c6d3b8438641d62ec1c996bda2780f /compiler/llvmGen/Llvm | |
parent | fa6cbdfb6e5d572dc74622d1c12e259c208321ab (diff) | |
download | haskell-a948fe838bc79363d7565033d6ee42bf24d52fdc.tar.gz |
Major Llvm refactoring
This combined patch reworks the LLVM backend in a number of ways:
1. Most prominently, we introduce a LlvmM monad carrying the contents of
the old LlvmEnv around. This patch completely removes LlvmEnv and
refactors towards standard library monad combinators wherever possible.
2. Support for streaming - we can now generate chunks of Llvm for Cmm as
it comes in. This might improve our speed.
3. To allow streaming, we need a more flexible way to handle forward
references. The solution (getGlobalPtr) unifies LlvmCodeGen.Data
and getHsFunc as well.
4. Skip alloca-allocation for registers that are actually never written.
LLVM will automatically eliminate these, but output is smaller and
friendlier to human eyes this way.
5. We use LlvmM to collect references for llvm.used. This allows places
other than cmmProcLlvmGens to generate entries.
Diffstat (limited to 'compiler/llvmGen/Llvm')
-rw-r--r-- | compiler/llvmGen/Llvm/Types.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs index c93147f4d0..6b9c8c181a 100644 --- a/compiler/llvmGen/Llvm/Types.hs +++ b/compiler/llvmGen/Llvm/Types.hs @@ -623,6 +623,8 @@ data LlvmLinkageType -- | Alias for 'ExternallyVisible' but with explicit textual form in LLVM -- assembly. | External + -- | Symbol is private to the module and should not appear in the symbol table + | Private deriving (Eq) instance Outputable LlvmLinkageType where |