aboutsummaryrefslogtreecommitdiff
path: root/LifetimeAnalysis.hs
diff options
context:
space:
mode:
Diffstat (limited to 'LifetimeAnalysis.hs')
-rw-r--r--LifetimeAnalysis.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/LifetimeAnalysis.hs b/LifetimeAnalysis.hs
index a590862..0921a8a 100644
--- a/LifetimeAnalysis.hs
+++ b/LifetimeAnalysis.hs
@@ -1,8 +1,9 @@
module LifetimeAnalysis(lifetimeAnalysis, Access(..), unAccess) where
-import Data.List
import Data.Maybe
+import Utils
+
data Access a = Write a | Read a
deriving (Show, Eq)
@@ -54,9 +55,6 @@ successors bbs (i, j) =
then [(i, j + 1)]
else [(n, 0) | n <- nexts]
-contains :: Eq a => [a] -> a -> Bool
-contains l v = isJust $ find (== v) l
-
modifyAt2 :: [[a]] -> (Int, Int) -> (a -> a) -> [[a]]
modifyAt2 l (i, j) f = modifyAt l i $ \li -> modifyAt li j f