Stopped the pass that removes unused variables removing unused replicators
This commit is contained in:
parent
732080557c
commit
15a4a59bcf
|
@ -303,7 +303,9 @@ checkUnusedVar = forAnyASTStructBottomUpAccum doSpec
|
|||
where
|
||||
doSpec :: Data a => A.Structured a -> CheckOptASTM' [A.Name] (A.Structured a) ()
|
||||
-- Don't touch PROCs, for now:
|
||||
doSpec (A.Spec _ (A.Specification mspec name (A.Proc {})) scope) = return ()
|
||||
doSpec (A.Spec _ (A.Specification mspec name (A.Proc {})) scope) = return ()
|
||||
-- DO NOT remove unused replicators!
|
||||
doSpec (A.Spec _ (A.Specification mspec name (A.Rep {})) scope) = return ()
|
||||
doSpec (A.Spec _ (A.Specification mspec name _) scope)
|
||||
= do -- We can't remove _sizes arrays because the backend uses them for bounds
|
||||
-- checks that are not explicit in the AST. We'll have to move the
|
||||
|
|
|
@ -160,7 +160,7 @@ expandArrayLiterals = pass "Expand array literals"
|
|||
--
|
||||
-- TODO for simplification, we could avoid pulling up replication counts that are known to be constants
|
||||
pullRepCounts :: Pass
|
||||
pullRepCounts = pass "Pull up replicator counts for SEQs"
|
||||
pullRepCounts = pass "Pull up replicator counts for SEQs, PARs and ALTs"
|
||||
(Prop.agg_namesDone ++ Prop.agg_typesDone)
|
||||
[]
|
||||
(applyDepthM2
|
||||
|
|
Loading…
Reference in New Issue
Block a user