summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2019-07-07 09:13:13 +0300
committerBen Gamari <ben@smart-cactus.org>2019-08-21 06:36:04 -0400
commit91d12f4e352f16bb99e07580f4bb9c6d1dc25498 (patch)
treebbb4e1bf2c15e7d62292d7b6147b4a50ede42188
parent0cc897f4016463b39552013d3cc6b6820a94ec88 (diff)
downloadhaskell-91d12f4e352f16bb99e07580f4bb9c6d1dc25498.tar.gz
Minor refactoring in CoreSimpl
When `join_ids` is empty `extendVarSetList existing_joins join_ids` is already no-op, so no need to check whether `join_ids` is empty or not before extending the joins set. (cherry picked from commit 897a59a5c0a08985ddccf00a4961cc2d080324e8)
-rw-r--r--compiler/coreSyn/CoreLint.hs3
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 53cddbfabe..460f1b84d3 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -2285,9 +2285,6 @@ markAllJoinsBadIf False m = m
addGoodJoins :: [Var] -> LintM a -> LintM a
addGoodJoins vars thing_inside
- | null join_ids
- = thing_inside
- | otherwise
= LintM $ \ env errs -> unLintM thing_inside (add_joins env) errs
where
add_joins env = env { le_joins = le_joins env `extendVarSetList` join_ids }