summaryrefslogtreecommitdiff
path: root/compiler/coreSyn
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r--compiler/coreSyn/CoreFVs.hs12
-rw-r--r--compiler/coreSyn/CoreLint.hs1
-rw-r--r--compiler/coreSyn/CoreOpt.hs23
-rw-r--r--compiler/coreSyn/CoreSyn.hs21
-rw-r--r--compiler/coreSyn/PprCore.hs18
5 files changed, 5 insertions, 70 deletions
diff --git a/compiler/coreSyn/CoreFVs.hs b/compiler/coreSyn/CoreFVs.hs
index 4a7251659b..a7a96e2fcd 100644
--- a/compiler/coreSyn/CoreFVs.hs
+++ b/compiler/coreSyn/CoreFVs.hs
@@ -37,7 +37,6 @@ module CoreFVs (
ruleRhsFreeVars, ruleFreeVars, rulesFreeVars,
rulesFreeVarsDSet,
ruleLhsFreeIds, ruleLhsFreeIdsList,
- vectsFreeVars,
expr_fvs,
@@ -515,17 +514,6 @@ put this 'f' in a Rec block, but will mark the binding as a non-rule loop
breaker, which is perfectly inlinable.
-}
--- |Free variables of a vectorisation declaration
-vectsFreeVars :: [CoreVect] -> VarSet
-vectsFreeVars = mapUnionVarSet vectFreeVars
- where
- vectFreeVars (Vect _ rhs) = fvVarSet $ filterFV isLocalId $ expr_fvs rhs
- vectFreeVars (NoVect _) = noFVs
- vectFreeVars (VectType _ _ _) = noFVs
- vectFreeVars (VectClass _) = noFVs
- vectFreeVars (VectInst _) = noFVs
- -- this function is only concerned with values, not types
-
{-
************************************************************************
* *
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index e5db499127..d92082c7e4 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -274,7 +274,6 @@ coreDumpFlag CoreDoWorkerWrapper = Just Opt_D_dump_worker_wrapper
coreDumpFlag CoreDoSpecialising = Just Opt_D_dump_spec
coreDumpFlag CoreDoSpecConstr = Just Opt_D_dump_spec
coreDumpFlag CoreCSE = Just Opt_D_dump_cse
-coreDumpFlag CoreDoVectorisation = Just Opt_D_dump_vect
coreDumpFlag CoreDesugar = Just Opt_D_dump_ds_preopt
coreDumpFlag CoreDesugarOpt = Just Opt_D_dump_ds
coreDumpFlag CoreTidy = Just Opt_D_dump_simpl
diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs
index 73bb427614..de0dd04656 100644
--- a/compiler/coreSyn/CoreOpt.hs
+++ b/compiler/coreSyn/CoreOpt.hs
@@ -127,25 +127,24 @@ simpleOptExprWith subst expr
----------------------
simpleOptPgm :: DynFlags -> Module
- -> CoreProgram -> [CoreRule] -> [CoreVect]
- -> IO (CoreProgram, [CoreRule], [CoreVect])
+ -> CoreProgram -> [CoreRule]
+ -> IO (CoreProgram, [CoreRule])
-- See Note [The simple optimiser]
-simpleOptPgm dflags this_mod binds rules vects
+simpleOptPgm dflags this_mod binds rules
= do { dumpIfSet_dyn dflags Opt_D_dump_occur_anal "Occurrence analysis"
(pprCoreBindings occ_anald_binds $$ pprRules rules );
- ; return (reverse binds', rules', vects') }
+ ; return (reverse binds', rules') }
where
occ_anald_binds = occurAnalysePgm this_mod
(\_ -> True) {- All unfoldings active -}
(\_ -> False) {- No rules active -}
- rules vects emptyVarSet binds
+ rules binds
(final_env, binds') = foldl do_one (emptyEnv, []) occ_anald_binds
final_subst = soe_subst final_env
rules' = substRulesForImportedIds final_subst rules
- vects' = substVects final_subst vects
-- We never unconditionally inline into rules,
-- hence paying just a substitution
@@ -536,18 +535,6 @@ wrapLet :: Maybe (Id,CoreExpr) -> CoreExpr -> CoreExpr
wrapLet Nothing body = body
wrapLet (Just (b,r)) body = Let (NonRec b r) body
-------------------
-substVects :: Subst -> [CoreVect] -> [CoreVect]
-substVects subst = map (substVect subst)
-
-------------------
-substVect :: Subst -> CoreVect -> CoreVect
-substVect subst (Vect v rhs) = Vect v (simpleOptExprWith subst rhs)
-substVect _subst vd@(NoVect _) = vd
-substVect _subst vd@(VectType _ _ _) = vd
-substVect _subst vd@(VectClass _) = vd
-substVect _subst vd@(VectInst _) = vd
-
{-
Note [Inline prag in simplOpt]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs
index 729825fd98..c2aeabefe6 100644
--- a/compiler/coreSyn/CoreSyn.hs
+++ b/compiler/coreSyn/CoreSyn.hs
@@ -92,9 +92,6 @@ module CoreSyn (
ruleArity, ruleName, ruleIdName, ruleActivation,
setRuleIdName, ruleModule,
isBuiltinRule, isLocalRule, isAutoRule,
-
- -- * Core vectorisation declarations data type
- CoreVect(..)
) where
#include "HsVersions.h"
@@ -112,7 +109,6 @@ import NameEnv( NameEnv, emptyNameEnv )
import Literal
import DataCon
import Module
-import TyCon
import BasicTypes
import DynFlags
import Outputable
@@ -1305,23 +1301,6 @@ setRuleIdName nm ru = ru { ru_fn = nm }
{-
************************************************************************
* *
-\subsection{Vectorisation declarations}
-* *
-************************************************************************
-
-Representation of desugared vectorisation declarations that are fed to the vectoriser (via
-'ModGuts').
--}
-
-data CoreVect = Vect Id CoreExpr
- | NoVect Id
- | VectType Bool TyCon (Maybe TyCon)
- | VectClass TyCon -- class tycon
- | VectInst Id -- instance dfun (always SCALAR) !!!FIXME: should be superfluous now
-
-{-
-************************************************************************
-* *
Unfoldings
* *
************************************************************************
diff --git a/compiler/coreSyn/PprCore.hs b/compiler/coreSyn/PprCore.hs
index ca2b8af560..f22d803cb1 100644
--- a/compiler/coreSyn/PprCore.hs
+++ b/compiler/coreSyn/PprCore.hs
@@ -612,21 +612,3 @@ instance Outputable id => Outputable (Tickish id) where
ppr (SourceNote span _) =
hcat [ text "src<", pprUserRealSpan True span, char '>']
-{-
------------------------------------------------------
--- Vectorisation declarations
------------------------------------------------------
--}
-
-instance Outputable CoreVect where
- ppr (Vect var e) = hang (text "VECTORISE" <+> ppr var <+> char '=')
- 4 (pprCoreExpr e)
- ppr (NoVect var) = text "NOVECTORISE" <+> ppr var
- ppr (VectType False var Nothing) = text "VECTORISE type" <+> ppr var
- ppr (VectType True var Nothing) = text "VECTORISE SCALAR type" <+> ppr var
- ppr (VectType False var (Just tc)) = text "VECTORISE type" <+> ppr var <+> char '=' <+>
- ppr tc
- ppr (VectType True var (Just tc)) = text "VECTORISE SCALAR type" <+> ppr var <+>
- char '=' <+> ppr tc
- ppr (VectClass tc) = text "VECTORISE class" <+> ppr tc
- ppr (VectInst var) = text "VECTORISE SCALAR instance" <+> ppr var