Skip to content

Draft: Use foldl' in OccurAnal.

doyougnu requested to merge doyougnu/ghc:wip/occuranal-foldl into master

Thank you for your contribution to GHC!

Please take a few moments to verify that your commits fulfill the following:

  • are either individually buildable or squashed
  • have commit messages which describe what they do (referring to Notes and tickets using #NNNN syntax when appropriate)
  • have added source comments describing your change.
  • add a testcase to the testsuite.
  • Swap out foldr in Core.Opt.OccurAnal for foldl'. The idea is that foldl' can be tail call optimized while foldr can't so in cases where short circuiting behavior is not required, we can get some minor speedups with foldl'.

MR related to !6761

I'm marking as draft, if the numbers look good then its an easy change to proliferate to other modules.

Merge request reports