Fixed the occam pass list so that it now has the correct order in respect to all the pre-requisite properties

This commit is contained in:
Neil Brown 2008-05-21 12:30:04 +00:00
parent 15cf63980f
commit 4537cd205c
4 changed files with 12 additions and 12 deletions

View File

@ -35,11 +35,11 @@ import Utils
squashArrays :: [Pass]
squashArrays = makePassesDep
[ ("Declare array-size arrays", declareSizesArray, prereq ++ [Prop.slicesSimplified,
[ ("Simplify array slices", simplifySlices, prereq, [Prop.slicesSimplified])
, ("Declare array-size arrays", declareSizesArray, prereq ++ [Prop.slicesSimplified,
Prop.arrayConstructorsRemoved], [Prop.arraySizesDeclared])
, ("Add array-size arrays to PROC headers", addSizesFormalParameters, prereq ++ [Prop.arraySizesDeclared], [])
, ("Add array-size arrays to PROC calls", addSizesActualParameters, prereq ++ [Prop.arraySizesDeclared], [])
, ("Simplify array slices", simplifySlices, prereq, [Prop.slicesSimplified])
]
where
prereq = Prop.agg_namesDone ++ Prop.agg_typesDone ++ Prop.agg_functionsGone ++ [Prop.subscriptsPulledUp, Prop.arrayLiteralsExpanded]

View File

@ -37,7 +37,13 @@ import Types
-- | Occam-specific frontend passes.
occamPasses :: [Pass]
occamPasses = makePassesDep' ((== FrontendOccam) . csFrontend)
[ ("Fold constants", foldConstants,
[ ("Dummy occam pass", dummyOccamPass,
[],
Prop.agg_namesDone ++ [Prop.mainTagged])
, ("Infer types", inferTypes,
[],
[Prop.inferredTypesRecorded])
, ("Fold constants", foldConstants,
[Prop.inferredTypesRecorded],
[Prop.constantsFolded])
, ("Fix the types of array constructors", fixConstructorTypes,
@ -46,9 +52,6 @@ occamPasses = makePassesDep' ((== FrontendOccam) . csFrontend)
, ("Check mandatory constants", checkConstants,
[Prop.constantsFolded, Prop.arrayConstructorTypesDone],
[Prop.constantsChecked])
, ("Infer types", inferTypes,
[],
[Prop.inferredTypesRecorded])
, ("Resolve ambiguities", resolveAmbiguities,
[Prop.inferredTypesRecorded],
[Prop.ambiguitiesResolved])
@ -56,9 +59,6 @@ occamPasses = makePassesDep' ((== FrontendOccam) . csFrontend)
[Prop.inferredTypesRecorded, Prop.ambiguitiesResolved],
[Prop.expressionTypesChecked, Prop.processTypesChecked,
Prop.functionTypesChecked, Prop.retypesChecked])
, ("Dummy occam pass", dummyOccamPass,
[],
Prop.agg_namesDone ++ [Prop.mainTagged])
]
-- | Fixed the types of array constructors according to the replicator count

View File

@ -47,10 +47,10 @@ commonPasses opts = concat $
, makePassesDep' csUsageChecking [("Usage checking", runPassR usageCheckPass, Prop.agg_namesDone, [Prop.parUsageChecked])]
-- If usage checking is turned off, the pass list will break unless we insert this dummy item:
, makePassesDep' (not . csUsageChecking) [("Usage checking turned OFF", return, Prop.agg_namesDone, [Prop.parUsageChecked])]
, simplifyComms
, simplifyExprs
, simplifyProcs
, unnest
, simplifyComms
, squashArrays
]

View File

@ -40,10 +40,10 @@ simplifyExprs = makePassesDep
Prop.functionTypesChecked], [Prop.functionsRemoved])
, ("Convert AFTER to MINUS", removeAfter, [Prop.expressionTypesChecked], [Prop.afterRemoved])
, ("Expand array literals", expandArrayLiterals, [Prop.expressionTypesChecked, Prop.processTypesChecked], [Prop.arrayLiteralsExpanded])
, ("Transform array constructors into initialisation code", transformConstr, Prop.agg_namesDone ++ Prop.agg_typesDone
++ [Prop.subscriptsPulledUp], [Prop.arrayConstructorsRemoved])
, ("Pull up replicator counts for SEQs", pullRepCounts, Prop.agg_namesDone ++ Prop.agg_typesDone, [])
, ("Pull up definitions", pullUp False, Prop.agg_namesDone ++ Prop.agg_typesDone ++ [Prop.functionsRemoved, Prop.seqInputsFlattened], [Prop.functionCallsRemoved, Prop.subscriptsPulledUp])
, ("Transform array constructors into initialisation code", transformConstr, Prop.agg_namesDone ++ Prop.agg_typesDone
++ [Prop.subscriptsPulledUp], [Prop.arrayConstructorsRemoved])
]
-- ++ makePassesDep' ((== BackendCPPCSP) . csBackend) [("Pull up definitions (C++)", pullUp True, Prop.agg_namesDone ++ [Prop.expressionTypesChecked, Prop.functionsRemoved, Prop.processTypesChecked,Prop.seqInputsFlattened], [Prop.functionCallsRemoved, Prop.subscriptsPulledUp])]