diff options
| author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2016-02-08 16:18:23 -0500 |
|---|---|---|
| committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2016-02-08 16:19:28 -0500 |
| commit | 023fc92f6f98a8bd003ce20083d3682aec865cb5 (patch) | |
| tree | b08895d5e7575cfc29fa0a13e37df4445b93f6bc /compiler/codeGen/StgCmmExpr.hs | |
| parent | 489a9a3beeeae3d150761ef863b4757eba0b02d9 (diff) | |
| download | haskell-023fc92f6f98a8bd003ce20083d3682aec865cb5.tar.gz | |
Remove unused LiveVars and SRT fields of StgCase
We also need to update `stgBindHasCafRefs` assertion with this change,
as we no longer have the pre-computed SRT, LiveVars etc. We rename it to
`topStgBindHasCafRefs` and implement it like this:
A non-updatable top-level binding may refer to a CAF by referring to a
top-level definition with CAFs. A top-level definition may have CAFs if
it's updatable. At this point (because this is done after TidyPgm)
top-level Ids (whether imported or defined in this module) are
GlobalIds, so the top-levelness test is easy. (see also comments in the
code)
Reviewers: bgamari, simonpj, austin
Reviewed By: simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1889
GHC Trac Issues: #11550
Diffstat (limited to 'compiler/codeGen/StgCmmExpr.hs')
| -rw-r--r-- | compiler/codeGen/StgCmmExpr.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs index 923450e6f3..0f3898bf81 100644 --- a/compiler/codeGen/StgCmmExpr.hs +++ b/compiler/codeGen/StgCmmExpr.hs @@ -71,7 +71,7 @@ cgExpr (StgLit lit) = do cmm_lit <- cgLit lit emitReturn [CmmLit cmm_lit] cgExpr (StgLet binds expr) = do { cgBind binds; cgExpr expr } -cgExpr (StgLetNoEscape _ _ binds expr) = +cgExpr (StgLetNoEscape binds expr) = do { u <- newUnique ; let join_id = mkBlockId u ; cgLneBinds join_id binds @@ -79,7 +79,7 @@ cgExpr (StgLetNoEscape _ _ binds expr) = ; emitLabel join_id ; return r } -cgExpr (StgCase expr _live_vars _save_vars bndr _srt alt_type alts) = +cgExpr (StgCase expr bndr alt_type alts) = cgCase expr bndr alt_type alts cgExpr (StgLam {}) = panic "cgExpr: StgLam" @@ -140,7 +140,7 @@ cgLetNoEscapeRhsBody -> Id -> StgRhs -> FCode (CgIdInfo, FCode ()) -cgLetNoEscapeRhsBody local_cc bndr (StgRhsClosure cc _bi _ _upd _ args body) +cgLetNoEscapeRhsBody local_cc bndr (StgRhsClosure cc _bi _ _upd args body) = cgLetNoEscapeClosure bndr local_cc cc (nonVoidIds args) body cgLetNoEscapeRhsBody local_cc bndr (StgRhsCon cc con args) = cgLetNoEscapeClosure bndr local_cc cc [] (StgConApp con args) |
