Commit 6934a650 authored by simonmar's avatar simonmar
Browse files

[project @ 2001-03-01 14:27:22 by simonmar]

don't needlessly duplicate a binder.
parent f89457ed
......@@ -295,9 +295,11 @@ coreToStgExpr (Case scrut bndr alts)
lookupLiveVarsForSet alts_fvs `thenLne` \ alts_lvs ->
let
-- determine whether the default binder is dead or not
bndr' = bndr `setIdOccInfo` occ_info
occ_info | bndr `elementOfFVInfo` alts_fvs = NoOccInfo
| otherwise = IAmDead
-- This helps the code generator to avoid generating an assignment
-- for the case binder (is extremely rare cases) ToDo: remove.
bndr'= if (bndr `elementOfFVInfo` alts_fvs)
then bndr
else bndr `setIdOccInfo` IAmDead
-- for a _ccall_GC_, some of the *arguments* need to live across the
-- call (see findLiveArgs comments.), so we annotate them as being live
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment