[project @ 2001-08-22 12:24:41 by simonmar]
[ghc-hetmet.git] / ghc / tests / programs / jeff-bug / Utils.hs
diff --git a/ghc/tests/programs/jeff-bug/Utils.hs b/ghc/tests/programs/jeff-bug/Utils.hs
deleted file mode 100644 (file)
index ed7b872..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-module Utils where
-
-import Hawk
-import Trans
-import DLX
-import Maybe
-import LazyST
-
---(f,g) >< (x,y) = (f x, g y)
-
-
-
-unique x = x
-{-
-unique (Sig xs) = runST (
-  do { x <- newSTRef 0
-     ; l <- mapM (anno x) xs
-     ; return $ Sig l
-     }
-  )
-  where anno x xs = mapM (anno' x) xs 
-        anno' x y = do { v <- readSTRef x 
-                       ; writeSTRef x (v+1)
-                       ; return $ addInfo (Loc (Word v)) y
-                       }
--}
-
-convert (Loc y) = Loc y
-convert (Imm y)    = Imm y
-convert (Reg r x) = Reg (Real r) x
-
-convertBack (Loc y) = Loc y
-convertBack (Imm y)    = Imm y
-convertBack (Reg (Real r) x) = Reg r x
-convertBack (Reg (Virtual _ (Just r)) x) = Reg r x
-convertBack t@(Reg (Virtual r Nothing) x) = error "ConvertBack"
-
-removeVirtuals t = Trans dest op src info
-      where src = map convertBack $ getSrc t
-            dest = map convertBack $ getDst t
-            info = map convertBack $ getInfo t
-            op = getOp t
-