mirror of
https://github.com/grin-compiler/grin.git
synced 2024-09-11 07:25:28 +03:00
Reverted back to old arity raising
The corresponding test case passes this way.
This commit is contained in:
parent
e74e9c3838
commit
3711138a8f
1
.gitignore
vendored
1
.gitignore
vendored
@ -22,3 +22,4 @@ cabal.project.local
|
||||
output/
|
||||
*.ibc
|
||||
*.agdai
|
||||
.output
|
||||
|
@ -39,7 +39,7 @@ import Transformations.Optimising.SimpleDeadParameterElimination (simpleDeadPara
|
||||
import Transformations.Optimising.CSE (commonSubExpressionElimination)
|
||||
import Transformations.Optimising.CaseCopyPropagation (caseCopyPropagation)
|
||||
import Transformations.Optimising.GeneralizedUnboxing (generalizedUnboxing)
|
||||
import Transformations.Optimising.ArityRaisingSimple (arityRaising)
|
||||
import Transformations.Optimising.ArityRaising (arityRaising)
|
||||
import Transformations.Optimising.CaseHoisting (caseHoisting)
|
||||
import Transformations.Optimising.Inlining (lateInlining)
|
||||
import Transformations.Optimising.NonSharedElimination (nonSharedElimination)
|
||||
|
@ -126,7 +126,7 @@ transformation n = \case
|
||||
CaseCopyPropagation -> noEffectMap $ noTypeEnv caseCopyPropagation
|
||||
CaseHoisting -> noEffectMap caseHoisting
|
||||
GeneralizedUnboxing -> noEffectMap generalizedUnboxing
|
||||
ArityRaising -> noEffectMap (arityRaising n)
|
||||
ArityRaising -> noEffectMap arityRaising
|
||||
LateInlining -> noEffectMap lateInlining
|
||||
UnitPropagation -> noEffectMap unitPropagation
|
||||
|
||||
@ -346,6 +346,7 @@ saveTransformationInfo name content = do
|
||||
outputDir <- view poOutputDir
|
||||
let fname = printf "%03d.%s" n name
|
||||
liftIO $ do
|
||||
createDirectoryIfMissing True outputDir
|
||||
writeFile (outputDir </> fname) $ show $ plain $ pretty content
|
||||
|
||||
saveTypeEnv :: PipelineM ()
|
||||
|
@ -14,7 +14,7 @@ runTests = hspec spec
|
||||
spec :: Spec
|
||||
spec = do
|
||||
-- TODO: Reenable before merge
|
||||
xit "multi indirection - full remove" $ do
|
||||
it "multi indirection - full remove" $ do
|
||||
let before = [prog|
|
||||
grinMain =
|
||||
p2 <- store (CInt 1)
|
||||
@ -57,9 +57,12 @@ spec = do
|
||||
[ Pass [HPT CompileToAbstractProgram, HPT RunAbstractProgramPure]
|
||||
, T ArityRaising
|
||||
, T CopyPropagation
|
||||
, Pass [HPT CompileToAbstractProgram, HPT RunAbstractProgramPure]
|
||||
, T SimpleDeadVariableElimination
|
||||
, Pass [HPT CompileToAbstractProgram, HPT RunAbstractProgramPure]
|
||||
, T ArityRaising
|
||||
, T CopyPropagation
|
||||
, Pass [HPT CompileToAbstractProgram, HPT RunAbstractProgramPure]
|
||||
, T SimpleDeadVariableElimination
|
||||
]
|
||||
(pipelineInfo, transformed) <- pipeline defaultOpts Nothing before ppln
|
||||
|
Loading…
Reference in New Issue
Block a user