diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-03-03 12:51:21 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-03-06 13:29:27 +0000 |
commit | 1163f4f2fe9aabd722c963497c67c5f8c71ef71b (patch) | |
tree | c7552c9470c76a4272a459f0b84a3236eef9ecf1 | |
parent | 9b2c73ea8082199245bfa6a28390b70b38f87fd1 (diff) | |
download | haskell-1163f4f2fe9aabd722c963497c67c5f8c71ef71b.tar.gz |
Tiny refactor
-rw-r--r-- | compiler/simplCore/OccurAnal.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs index 3aaa1f3d47..c8282497aa 100644 --- a/compiler/simplCore/OccurAnal.hs +++ b/compiler/simplCore/OccurAnal.hs @@ -1357,13 +1357,13 @@ nodeScore old_bndr new_bndr bind_rhs lb_deps = mk_score 5 -- Note [Constructor applications] | isStableUnfolding id_unfolding - , canUnfold id_unfolding + , can_unfold = mk_score 3 | isOneOcc (idOccInfo new_bndr) = mk_score 2 -- Likely to be inlined - | canUnfold id_unfolding -- The Id has some kind of unfolding + | can_unfold -- The Id has some kind of unfolding = mk_score 1 | otherwise @@ -1386,6 +1386,7 @@ nodeScore old_bndr new_bndr bind_rhs lb_deps -> size _ -> cheapExprSize rhs + can_unfold = canUnfold id_unfolding id_unfolding = realIdUnfolding old_bndr -- realIdUnfolding: Ignore loop-breaker-ness here because -- that is what we are setting! |