Some cleanup of the Exitification code
authorJoachim Breitner <mail@joachim-breitner.de>
Fri, 6 Apr 2018 21:26:45 +0000 (17:26 -0400)
committerJoachim Breitner <mail@joachim-breitner.de>
Mon, 9 Apr 2018 15:25:06 +0000 (11:25 -0400)
commitb14c03737574895718eed786a60dfdfd42ab49ce
treecb649dc1d68784fe8a8b8e8bdc5d37a252fdfcf4
parent8b823f270e53627ddca1a993c05f1ab556742d96
Some cleanup of the Exitification code

based on a thorough review by Simon in comments
https://ghc.haskell.org/trac/ghc/ticket/14152#comment:33
through 37.

The changes are:

 * `isExitJoinId` is moved to `SimplUtils`, because
   it is only valid when occurrence information is up-to-date.
 * Abstracted variables are properly sorted using `sortQuantVars`
 * Exitification does not set occ info.

 And then minor quibles to notes and avoiding some unhelpful shadowing
 of local names.

 Differential Revision: https://phabricator.haskell.org/D4576
compiler/basicTypes/Id.hs
compiler/simplCore/Exitify.hs
compiler/simplCore/SimplUtils.hs