summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmEnv.hs
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2016-09-20 00:19:15 -0400
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2016-09-20 00:19:27 -0400
commit14c2e8e0c11bb2b95f81303284d1460bb80a9a98 (patch)
treeb9c67117f0e2f7f79037e9a07c20a0256800f5cc /compiler/codeGen/StgCmmEnv.hs
parentea310f9956179f91ca973bc747b0bc7b061bc174 (diff)
downloadhaskell-14c2e8e0c11bb2b95f81303284d1460bb80a9a98.tar.gz
Codegen for case: Remove redundant void id checks
New unarise (714bebf) eliminates void binders in patterns already, so no need to eliminate them here. I leave assertions to make sure this is the case. Assertion failure -> bug in unarise Reviewers: bgamari, simonpj, austin, simonmar, hvr Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2416
Diffstat (limited to 'compiler/codeGen/StgCmmEnv.hs')
-rw-r--r--compiler/codeGen/StgCmmEnv.hs22
1 files changed, 1 insertions, 21 deletions
diff --git a/compiler/codeGen/StgCmmEnv.hs b/compiler/codeGen/StgCmmEnv.hs
index 44d3df84ee..30307a2a3a 100644
--- a/compiler/codeGen/StgCmmEnv.hs
+++ b/compiler/codeGen/StgCmmEnv.hs
@@ -13,8 +13,6 @@ module StgCmmEnv (
litIdInfo, lneIdInfo, rhsIdInfo, mkRhsInit,
idInfoToAmode,
- NonVoid(..), unsafe_stripNV, nonVoidIds,
-
addBindC, addBindsC,
bindArgsToRegs, bindToReg, rebindToReg,
@@ -30,6 +28,7 @@ import TyCon
import StgCmmMonad
import StgCmmUtils
import StgCmmClosure
+import StgSyn (StgArg)
import CLabel
@@ -46,25 +45,6 @@ import UniqFM
import VarEnv
-------------------------------------
--- Non-void types
--------------------------------------
--- We frequently need the invariant that an Id or a an argument
--- is of a non-void type. This type is a witness to the invariant.
-
-newtype NonVoid a = NonVoid a
- deriving (Eq, Show)
-
--- Use with care; if used inappropriately, it could break invariants.
-unsafe_stripNV :: NonVoid a -> a
-unsafe_stripNV (NonVoid a) = a
-
-instance (Outputable a) => Outputable (NonVoid a) where
- ppr (NonVoid a) = ppr a
-
-nonVoidIds :: [Id] -> [NonVoid Id]
-nonVoidIds ids = [NonVoid id | id <- ids, not (isVoidRep (idPrimRep id))]
-
--------------------------------------
-- Manipulating CgIdInfo
-------------------------------------