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 (cherry picked from commit ae0cff0a)
Showing
- compiler/simplCore/CSE.hs 32 additions, 2 deletionscompiler/simplCore/CSE.hs
- testsuite/tests/simplCore/should_compile/T15002.hs 12 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T15002.hs
- testsuite/tests/simplCore/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/simplCore/should_compile/all.T
Please register or sign in to comment