[commit: ghc] wip/kavon-nosplit-llvm: more workarounds (afc55a4)

git at git.haskell.org git at git.haskell.org
Fri Sep 1 04:08:20 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/kavon-nosplit-llvm
Link       : http://ghc.haskell.org/trac/ghc/changeset/afc55a495da59e6b3402e3f59010e03fb742cff8/ghc

>---------------------------------------------------------------

commit afc55a495da59e6b3402e3f59010e03fb742cff8
Author: Kavon Farvardin <kavon at farvard.in>
Date:   Thu Aug 31 23:08:12 2017 -0500

    more workarounds


>---------------------------------------------------------------

afc55a495da59e6b3402e3f59010e03fb742cff8
 compiler/main/DriverPipeline.hs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index f885424..a65fff9 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1517,8 +1517,13 @@ runPhase (RealPhaseWithInfo mangInfo LlvmLlc) input_fn dflags
     return (doNext, output_fn)
   where
         
-        -- TODO(kavon): temporary
-        cpscall_workaround = ["-disable-machine-cse", "-enable-shrink-wrap=false"]
+        -- TODO(kavon): These workarounds are temporary until I fix them in LLVM.
+        --
+        --  * Disabling CSE and LICM are related to constants spills (ghc-llvm issue #11)
+        --  * Disabling shrink wrapping is related to inserting prologues at each return point
+        --    for stack alignment purposes.
+        --  * Disabling jump-table switches is discussed in ghc-llvm issue #20.
+        cpscall_workaround = ["-disable-machine-cse", "-disable-machine-licm", "-enable-shrink-wrap=false", "-min-jump-table-entries=1000"]
       
         -- Bug in LLVM at O3 on OSX.
         llvmOpts = if platformOS (targetPlatform dflags) == OSDarwin



More information about the ghc-commits mailing list