[commit: ghc] wip/kavon-nosplit-llvm: see below. do not write RA to stack with LLVM. (b00df64)

git at git.haskell.org git at git.haskell.org
Tue Jun 27 09:14:53 UTC 2017


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

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

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

commit b00df644588506f57bb5515b0b3cc9d1b2078351
Author: Kavon Farvardin <kavon at farvard.in>
Date:   Fri May 12 15:35:32 2017 +0100

    see below. do not write RA to stack with LLVM.
    
    only for native calls right now.
    
    1. this breaks the fragile [diamond proc point] optimization, though
       there is a better way to implement that optimization through the
       use of headers for proc-points (sort of like critical edge
       splitting).
    
    2. need to do the same for foreign calls with LLVM too.


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

b00df644588506f57bb5515b0b3cc9d1b2078351
 compiler/cmm/MkGraph.hs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/compiler/cmm/MkGraph.hs b/compiler/cmm/MkGraph.hs
index 81d9c0f..0c71210 100644
--- a/compiler/cmm/MkGraph.hs
+++ b/compiler/cmm/MkGraph.hs
@@ -361,8 +361,11 @@ copyOutOflow dflags conv transfer area actuals updfr_off extra_stack_stuff
                          -- the return address if making a call
                   case transfer of
                      Call -> 
-                       ([(CmmLit (CmmBlock id), StackParam init_offset)],
-                       widthInBytes (wordWidth dflags))
+                       if hscTarget dflags == HscLlvm
+                         then ([], widthInBytes (wordWidth dflags))
+                         else
+                           ([(CmmLit (CmmBlock id), StackParam init_offset)],
+                           widthInBytes (wordWidth dflags))
                      JumpRet ->
                        ([],
                        widthInBytes (wordWidth dflags))



More information about the ghc-commits mailing list