summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2010-06-15 09:47:14 +0000
committerDavid Terei <davidterei@gmail.com>2010-06-15 09:47:14 +0000
commit49a8e5c021009430d373d6224b29004c7d18c408 (patch)
tree5e49c02cc6ad756d92ef71d4ab16338b278352a6 /driver
parent0c41772cba7ec3f558cd2619716c7db771eae935 (diff)
downloadhaskell-49a8e5c021009430d373d6224b29004c7d18c408.tar.gz
Add new LLVM code generator to GHC. (Version 2)
This was done as part of an honours thesis at UNSW, the paper describing the work and results can be found at: http://www.cse.unsw.edu.au/~pls/thesis/davidt-thesis.pdf A Homepage for the backend can be found at: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM Quick summary of performance is that for the 'nofib' benchmark suite, runtimes are within 5% slower than the NCG and generally better than the C code generator. For some code though, such as the DPH projects benchmark, the LLVM code generator outperforms the NCG and C code generator by about a 25% reduction in run times.
Diffstat (limited to 'driver')
-rw-r--r--driver/mangler/ghc-asm.lprl6
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/mangler/ghc-asm.lprl b/driver/mangler/ghc-asm.lprl
index 1ff78a4aa8..a354caada7 100644
--- a/driver/mangler/ghc-asm.lprl
+++ b/driver/mangler/ghc-asm.lprl
@@ -1445,7 +1445,8 @@ sub mangle_asm {
# If this is an entry point with an info table,
# eliminate the entry symbol and all directives involving it.
- if (defined($infochk{$symb}) && $TargetPlatform !~ /^ia64-/m) {
+ if (defined($infochk{$symb}) && $TargetPlatform !~ /^ia64-/m
+ && $TABLES_NEXT_TO_CODE ~~ "YES") {
@o = ();
foreach $l (split(/\n/m,$c)) {
next if $l =~ /^.*$symb_(entry|ret)${T_POST_LBL}/m;
@@ -1880,7 +1881,8 @@ sub rev_tbl {
# use vars '$discard1'; # Unused?
local($symb, $tbl, $discard1) = @_;
- return ($tbl) if ($TargetPlatform =~ /^ia64-/m);
+ return ($tbl) if ($TargetPlatform =~ /^ia64-/m
+ || $TABLES_NEXT_TO_CODE ~~ "NO");
local($before) = '';
local($label) = '';