1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 14:28:08 +03:00
juvix/test/Reg/Transformation/CopyPropagation.hs
Łukasz Czajka 235d88f303
Copy propagation in JuvixReg (#2828)
* Closes #1614 
* Implements the copy propagation transformation in JuvixReg and adds
tests for it.
* For this optimization to give any improvement, we need to run dead
code elimination afterwards (#2827).
2024-06-18 21:38:02 +02:00

22 lines
505 B
Haskell

module Reg.Transformation.CopyPropagation where
import Base
import Juvix.Compiler.Reg.Transformation
import Reg.Parse.Positive qualified as Parse
import Reg.Transformation.Base
allTests :: TestTree
allTests = testGroup "Copy Propagation" (map liftTest Parse.tests)
pipe :: [TransformationId]
pipe = [CopyPropagation]
liftTest :: Parse.PosTest -> TestTree
liftTest _testRun =
fromTest
Test
{ _testTransformations = pipe,
_testAssertion = const (return ()),
_testRun
}