hoopl 3.7.3.4 → 3.7.3.5
raw patch · 3 files changed
+15/−11 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Compiler.Hoopl.Dataflow: NewFact :: a -> NewFact a
+ Compiler.Hoopl.Dataflow: OldFact :: a -> OldFact a
+ Compiler.Hoopl.Dataflow: newtype NewFact a
+ Compiler.Hoopl.Dataflow: newtype OldFact a
+ Compiler.Hoopl.Dataflow: type JoinFun a = OldFact a -> NewFact a -> (ChangeFlag, a)
- Compiler.Hoopl.Dataflow: DataflowLattice :: String -> a -> (a -> a -> (ChangeFlag, a)) -> Bool -> DataflowLattice a
+ Compiler.Hoopl.Dataflow: DataflowLattice :: String -> a -> JoinFun a -> Bool -> DataflowLattice a
- Compiler.Hoopl.Dataflow: fact_extend :: DataflowLattice a -> a -> a -> (ChangeFlag, a)
+ Compiler.Hoopl.Dataflow: fact_extend :: DataflowLattice a -> JoinFun a
Files
- Compiler/Hoopl/Dataflow.hs +13/−9
- hoopl.cabal +2/−2
- hoopl.pdf binary
Compiler/Hoopl/Dataflow.hs view
@@ -56,7 +56,7 @@ -} module Compiler.Hoopl.Dataflow - ( DataflowLattice(..)+ ( DataflowLattice(..), JoinFun, OldFact(..), NewFact(..) , ChangeFlag(..), changeIf , FwdPass(..), FwdTransfer, FwdRewrite, SimpleFwdRewrite , noFwdRewrite, thenFwdRw, shallowFwdRw, deepFwdRw@@ -78,14 +78,18 @@ -- DataflowLattice ----------------------------------------------------------------------------- -data DataflowLattice a = DataflowLattice { - fact_name :: String, -- Documentation- fact_bot :: a, -- Lattice bottom element- fact_extend :: a -> a -> (ChangeFlag,a), -- Lattice join plus change flag- -- (changes iff result > first arg)- fact_do_logging :: Bool -- log changes-}+data DataflowLattice a = DataflowLattice + { fact_name :: String -- Documentation+ , fact_bot :: a -- Lattice bottom element+ , fact_extend :: JoinFun a -- Lattice join plus change flag+ -- (changes iff result > old fact)+ , fact_do_logging :: Bool -- log changes+ } +type JoinFun a = OldFact a -> NewFact a -> (ChangeFlag, a)+newtype OldFact a = OldFact a+newtype NewFact a = NewFact a+ data ChangeFlag = NoChange | SomeChange changeIf :: Bool -> ChangeFlag changeIf changed = if changed then SomeChange else NoChange@@ -349,7 +353,7 @@ (cha2, res_fact) = case lookupFact fbase lbl of Nothing -> (SomeChange, new_fact) -- Note [Unreachable blocks]- Just old_fact -> fact_extend lat new_fact old_fact+ Just old_fact -> fact_extend lat (OldFact old_fact) (NewFact new_fact) new_fbase = extendFactBase fbase lbl res_fact fixpoint :: forall n f. Edges n
hoopl.cabal view
@@ -1,5 +1,5 @@ Name: hoopl-Version: 3.7.3.4+Version: 3.7.3.5 Description: Higher-order optimization library License: BSD3 License-file: LICENSE@@ -8,7 +8,7 @@ Build-Type: Simple Cabal-Version: >=1.2 Synopsis: A library to support dataflow analysis and optimization-Category: Compilers/Interpeters+Category: Compilers/Interpreters Extra-source-files: README, hoopl.pdf Library
hoopl.pdf view
binary file changed (255007 → 255755 bytes)