Added the simplifyComms pass to the shared pass list for the compiler, and removed the corresponding code in the C backend that the pass replaces
This commit is contained in:
parent
126226b039
commit
4935a04aa4
2
Main.hs
2
Main.hs
|
@ -40,6 +40,7 @@ import ParseRain
|
|||
import Pass
|
||||
import PreprocessOccam
|
||||
import RainPasses
|
||||
import SimplifyComms
|
||||
import SimplifyExprs
|
||||
import SimplifyProcs
|
||||
import SimplifyTypes
|
||||
|
@ -51,6 +52,7 @@ commonPasses =
|
|||
, ("Simplify expressions", simplifyExprs)
|
||||
, ("Simplify processes", simplifyProcs)
|
||||
, ("Flatten nested declarations", unnest)
|
||||
, ("Simplify communications", simplifyComms)
|
||||
]
|
||||
|
||||
type OptFunc = CompState -> IO CompState
|
||||
|
|
|
@ -1001,18 +1001,6 @@ cgenOutputItem ops c (A.OutExpression m e)
|
|||
tell [","]
|
||||
call genBytesIn ops t (Just v)
|
||||
tell [");"]
|
||||
_ ->
|
||||
do n <- makeNonce "output_item"
|
||||
tell ["const "]
|
||||
call genType ops t
|
||||
tell [" ", n, " = "]
|
||||
call genExpression ops e
|
||||
tell [";\n"]
|
||||
tell ["ChanOut ("]
|
||||
call genVariable ops c
|
||||
tell [", &", n, ", "]
|
||||
call genBytesIn ops t Nothing
|
||||
tell [");\n"]
|
||||
--}}}
|
||||
|
||||
--{{{ replicators
|
||||
|
|
Loading…
Reference in New Issue
Block a user