[commit: ghc] master: RegAlloc: Remove duplicate seqList (use seqList from Util) (3bfe6a5)

git at git.haskell.org git at git.haskell.org
Sat Aug 6 13:44:40 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3bfe6a52783d00d0f7231a2d58c6279c8a580812/ghc

>---------------------------------------------------------------

commit 3bfe6a52783d00d0f7231a2d58c6279c8a580812
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Sat Aug 6 12:56:50 2016 +0000

    RegAlloc: Remove duplicate seqList (use seqList from Util)


>---------------------------------------------------------------

3bfe6a52783d00d0f7231a2d58c6279c8a580812
 compiler/nativeGen/RegAlloc/Graph/Main.hs | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs
index 0b10f3c..97c2b42 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Main.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs
@@ -16,13 +16,14 @@ import TargetReg
 import RegClass
 import Reg
 
-import UniqSupply
-import UniqSet
-import UniqFM
 import Bag
+import DynFlags
 import Outputable
 import Platform
-import DynFlags
+import UniqFM
+import UniqSet
+import UniqSupply
+import Util (seqList)
 
 import Data.List
 import Data.Maybe
@@ -221,7 +222,7 @@ regAlloc_spin dflags spinCount triv regsFree slotsFree debug_codeGraphs code
                                 else []
 
                 -- Ensure all the statistics are evaluated, to avoid space leaks.
-                seqList statList `seq` return ()
+                seqList statList (return ())
 
                 return  ( code_final
                         , statList
@@ -268,7 +269,7 @@ regAlloc_spin dflags spinCount triv regsFree slotsFree debug_codeGraphs code
                                 else []
 
                 -- Ensure all the statistics are evaluated, to avoid space leaks.
-                seqList statList `seq` return ()
+                seqList statList (return ())
 
                 regAlloc_spin dflags (spinCount + 1) triv regsFree slotsFree'
                         statList
@@ -447,11 +448,3 @@ seqRealRegList rs
  = case rs of
         []              -> ()
         (r : rs)        -> seqRealReg r `seq` seqRealRegList rs
-
-seqList :: [a] -> ()
-seqList ls
- = case ls of
-        []              -> ()
-        (r : rs)        -> r `seq` seqList rs
-
-



More information about the ghc-commits mailing list