[GHC] #14152: Float exit paths out of recursive functions

GHC ghc-devs at haskell.org
Fri Apr 6 09:21:09 UTC 2018


#14152: Float exit paths out of recursive functions
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:  (none)
            Type:  task              |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:  JoinPoints
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14137 #10918     |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Also in `Exitify`:
 {{{
         -- We cannot abstract over join points
         captures_join_points = any isJoinId args
 }}}
 Isn't this vacuously false?  Join points are never arguments -- or they
 would not be join points!

 Ah, no... `args` is (confusingly) not the argument of the call (although
 you use `args` for this purpose in the `collectArgs` call...aargh.   Can
 we rename `args` to `abs_vars`, the variables over which we are going  to
 abstract?

 Ah!  You probably need to topologically sort those `abs_vars`; see the
 `sortQuantVars` call in `SetLevels.abstractVars`.  A bug waiting to
 happen.

 Returning to `captures_join_points` this can only be true of a call of
 form `j e1 .. en`, which you deal with in an earlier case... so the test
 would better be done there.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14152#comment:36>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list