CSE: Walk past join point lambdas (#15002)
authorJoachim Breitner <mail@joachim-breitner.de>
Thu, 5 Apr 2018 14:02:25 +0000 (10:02 -0400)
committerJoachim Breitner <mail@joachim-breitner.de>
Tue, 10 Apr 2018 02:15:03 +0000 (22:15 -0400)
commitae0cff0a1834d8b041b06d0e1ab6ce969aac44c8
tree93494c1d152facd477359d30ea0ee88510a9dc72
parent1aa1d405d8212a99ac24dcfd48024a17c3ffd296
CSE: Walk past join point lambdas (#15002)

As the CSE transformation traverses the syntax tree, it needs to go past
the lambdas of a join point, and only look for CSE opportunities inside,
as a join point’s lambdas must be preserved. Simple fix; comes with a
Note and a test case.

Thanks to Ryan Scott for an excellently minimized test case, and for
bisecting GHC.

Differential Revision: https://phabricator.haskell.org/D4572
compiler/simplCore/CSE.hs
testsuite/tests/simplCore/should_compile/T15002.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T