diff options
author | Ian Lynagh <igloo@earth.li> | 2008-02-07 01:57:14 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-02-07 01:57:14 +0000 |
commit | 1370a4a360ec154b390c1da21d40e446739b24c8 (patch) | |
tree | 980c5beb71d643ae79a873c38c0753ad0ae002e9 | |
parent | 15575cf8f17fee0fdd3151c5dbb0a0f89b01c708 (diff) | |
download | haskell-1370a4a360ec154b390c1da21d40e446739b24c8.tar.gz |
Make some more modules use LazyUniqFM instead of UniqFM
If these modules use UniqFM then we get a stack overflow when compiling
modules that use fundeps. I haven't tracked down the actual cause.
-rw-r--r-- | compiler/basicTypes/NewDemand.lhs | 2 | ||||
-rw-r--r-- | compiler/basicTypes/VarEnv.lhs | 2 | ||||
-rw-r--r-- | compiler/coreSyn/CoreFVs.lhs | 2 | ||||
-rw-r--r-- | compiler/coreSyn/CoreTidy.lhs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/AsmCodeGen.lhs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/MachRegs.lhs | 11 | ||||
-rw-r--r-- | compiler/nativeGen/RegAllocColor.hs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/RegAllocLinear.hs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/RegAllocStats.hs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/RegLiveness.hs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/RegSpillCost.hs | 2 | ||||
-rw-r--r-- | compiler/simplCore/OccurAnal.lhs | 2 | ||||
-rw-r--r-- | compiler/stranal/DmdAnal.lhs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcGadt.lhs | 2 | ||||
-rw-r--r-- | compiler/utils/GraphBase.hs | 2 | ||||
-rw-r--r-- | compiler/utils/GraphColor.hs | 2 | ||||
-rw-r--r-- | compiler/utils/GraphOps.hs | 2 | ||||
-rw-r--r-- | compiler/utils/GraphPpr.hs | 2 | ||||
-rw-r--r-- | compiler/utils/LazyUniqFM.lhs | 4 | ||||
-rw-r--r-- | compiler/utils/UniqSet.lhs | 2 | ||||
-rw-r--r-- | compiler/vectorise/VectType.hs | 2 |
21 files changed, 25 insertions, 28 deletions
diff --git a/compiler/basicTypes/NewDemand.lhs b/compiler/basicTypes/NewDemand.lhs index 2361972037..062e25ff30 100644 --- a/compiler/basicTypes/NewDemand.lhs +++ b/compiler/basicTypes/NewDemand.lhs @@ -35,7 +35,7 @@ module NewDemand( import StaticFlags import BasicTypes import VarEnv -import LazyUniqFM +import UniqFM import Util import Outputable \end{code} diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs index dbef903de8..3b0be0bebf 100644 --- a/compiler/basicTypes/VarEnv.lhs +++ b/compiler/basicTypes/VarEnv.lhs @@ -46,7 +46,7 @@ module VarEnv ( import OccName import Var import VarSet -import LazyUniqFM +import UniqFM import Unique import Util import Maybes diff --git a/compiler/coreSyn/CoreFVs.lhs b/compiler/coreSyn/CoreFVs.lhs index 199cc694c7..57316c7211 100644 --- a/compiler/coreSyn/CoreFVs.lhs +++ b/compiler/coreSyn/CoreFVs.lhs @@ -38,7 +38,7 @@ import CoreSyn import Id import IdInfo import NameSet -import LazyUniqFM +import UniqFM import Name import VarSet import Var diff --git a/compiler/coreSyn/CoreTidy.lhs b/compiler/coreSyn/CoreTidy.lhs index 4da1dc3350..5acee51f42 100644 --- a/compiler/coreSyn/CoreTidy.lhs +++ b/compiler/coreSyn/CoreTidy.lhs @@ -22,7 +22,7 @@ import IdInfo import Type import Var import VarEnv -import LazyUniqFM +import UniqFM import Name hiding (tidyNameOcc) import OccName import SrcLoc diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index e0608cb80c..6d3bf7ca75 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -40,7 +40,7 @@ import MachOp import CLabel import State -import LazyUniqFM +import UniqFM import Unique ( Unique, getUnique ) import UniqSupply import List ( groupBy, sortBy ) diff --git a/compiler/nativeGen/MachRegs.lhs b/compiler/nativeGen/MachRegs.lhs index 2c6238d834..5832abe786 100644 --- a/compiler/nativeGen/MachRegs.lhs +++ b/compiler/nativeGen/MachRegs.lhs @@ -105,8 +105,7 @@ import UniqSet import Constants import FastTypes import FastBool -import qualified UniqFM as S -import LazyUniqFM +import UniqFM #if powerpc_TARGET_ARCH import Data.Word ( Word8, Word16, Word32 ) @@ -520,20 +519,20 @@ worst n classN classC {-# INLINE regClass #-} trivColorable :: RegClass -> UniqSet Reg -> UniqSet Reg -> Bool -trivColorable classN (MkUniqFM conflicts) (MkUniqFM exclusions) +trivColorable classN conflicts exclusions = {-# SCC "trivColorable" #-} let {-# INLINE isSqueesed #-} isSqueesed cI cF ufm = case ufm of - S.NodeUFM _ _ left right + NodeUFM _ _ left right -> case isSqueesed cI cF right of (# s, cI', cF' #) -> case s of False -> isSqueesed cI' cF' left True -> (# True, cI', cF' #) - S.LeafUFM _ (Lazy reg) + LeafUFM _ reg -> case regClass reg of RcInteger -> case cI +# _ILIT(1) of @@ -543,7 +542,7 @@ trivColorable classN (MkUniqFM conflicts) (MkUniqFM exclusions) -> case cF +# _ILIT(1) of cF' -> (# cF' >=# ALLOCATABLE_REGS_DOUBLE, cI, cF' #) - S.EmptyUFM + EmptyUFM -> (# False, cI, cF #) in case isSqueesed (_ILIT(0)) (_ILIT(0)) conflicts of diff --git a/compiler/nativeGen/RegAllocColor.hs b/compiler/nativeGen/RegAllocColor.hs index e2e002af35..51a0bffbc6 100644 --- a/compiler/nativeGen/RegAllocColor.hs +++ b/compiler/nativeGen/RegAllocColor.hs @@ -24,7 +24,7 @@ import PprMach import UniqSupply import UniqSet -import LazyUniqFM +import UniqFM import Bag import Outputable import DynFlags diff --git a/compiler/nativeGen/RegAllocLinear.hs b/compiler/nativeGen/RegAllocLinear.hs index b333c68d5d..e6491b77ee 100644 --- a/compiler/nativeGen/RegAllocLinear.hs +++ b/compiler/nativeGen/RegAllocLinear.hs @@ -97,7 +97,7 @@ import Cmm hiding (RegSet) import Digraph import Unique ( Uniquable(getUnique), Unique ) import UniqSet -import LazyUniqFM +import UniqFM import UniqSupply import Outputable import State diff --git a/compiler/nativeGen/RegAllocStats.hs b/compiler/nativeGen/RegAllocStats.hs index 32c0942488..58a69fa76e 100644 --- a/compiler/nativeGen/RegAllocStats.hs +++ b/compiler/nativeGen/RegAllocStats.hs @@ -30,7 +30,7 @@ import MachInstrs import Cmm import Outputable -import LazyUniqFM +import UniqFM import UniqSet import State diff --git a/compiler/nativeGen/RegLiveness.hs b/compiler/nativeGen/RegLiveness.hs index 6f21db8b77..9ee98971ba 100644 --- a/compiler/nativeGen/RegLiveness.hs +++ b/compiler/nativeGen/RegLiveness.hs @@ -42,7 +42,7 @@ import Digraph import Outputable import Unique import UniqSet -import LazyUniqFM +import UniqFM import UniqSupply import Bag import State diff --git a/compiler/nativeGen/RegSpillCost.hs b/compiler/nativeGen/RegSpillCost.hs index b492738238..d987937102 100644 --- a/compiler/nativeGen/RegSpillCost.hs +++ b/compiler/nativeGen/RegSpillCost.hs @@ -23,7 +23,7 @@ import MachInstrs import MachRegs import Cmm -import LazyUniqFM +import UniqFM import UniqSet import Outputable import State diff --git a/compiler/simplCore/OccurAnal.lhs b/compiler/simplCore/OccurAnal.lhs index efc51ba6a9..bdf38ee406 100644 --- a/compiler/simplCore/OccurAnal.lhs +++ b/compiler/simplCore/OccurAnal.lhs @@ -33,7 +33,7 @@ import Maybes ( orElse ) import Digraph ( stronglyConnCompR, SCC(..) ) import PrelNames ( buildIdKey, foldrIdKey, runSTRepIdKey, augmentIdKey ) import Unique ( Unique ) -import LazyUniqFM ( keysUFM, intersectUFM_C, foldUFM_Directly ) +import UniqFM ( keysUFM, intersectUFM_C, foldUFM_Directly ) import Util ( mapAndUnzip ) import Outputable diff --git a/compiler/stranal/DmdAnal.lhs b/compiler/stranal/DmdAnal.lhs index c4453242ef..66bf92648c 100644 --- a/compiler/stranal/DmdAnal.lhs +++ b/compiler/stranal/DmdAnal.lhs @@ -45,7 +45,7 @@ import Var ( Var ) import VarEnv import TysWiredIn ( unboxedPairDataCon ) import TysPrim ( realWorldStatePrimTy ) -import LazyUniqFM ( plusUFM_C, addToUFM_Directly, lookupUFM_Directly, +import UniqFM ( plusUFM_C, addToUFM_Directly, lookupUFM_Directly, keysUFM, minusUFM, ufmToList, filterUFM ) import Type ( isUnLiftedType, coreEqType, splitTyConApp_maybe ) import Coercion ( coercionKind ) diff --git a/compiler/typecheck/TcGadt.lhs b/compiler/typecheck/TcGadt.lhs index b3156ed747..b556e89e32 100644 --- a/compiler/typecheck/TcGadt.lhs +++ b/compiler/typecheck/TcGadt.lhs @@ -40,7 +40,7 @@ import Control.Monad import Outputable import TcType import Unique -import LazyUniqFM +import UniqFM \end{code} diff --git a/compiler/utils/GraphBase.hs b/compiler/utils/GraphBase.hs index 3948c81a6a..04eda96120 100644 --- a/compiler/utils/GraphBase.hs +++ b/compiler/utils/GraphBase.hs @@ -14,7 +14,7 @@ module GraphBase ( where import UniqSet -import LazyUniqFM +import UniqFM -- | A fn to check if a node is trivially colorable diff --git a/compiler/utils/GraphColor.hs b/compiler/utils/GraphColor.hs index e381fbf7f6..8e7989dc8c 100644 --- a/compiler/utils/GraphColor.hs +++ b/compiler/utils/GraphColor.hs @@ -19,7 +19,7 @@ import GraphOps import GraphPpr import Unique -import LazyUniqFM +import UniqFM import UniqSet import Outputable diff --git a/compiler/utils/GraphOps.hs b/compiler/utils/GraphOps.hs index a82ff68629..880f3c65cd 100644 --- a/compiler/utils/GraphOps.hs +++ b/compiler/utils/GraphOps.hs @@ -24,7 +24,7 @@ import GraphBase import Outputable import Unique import UniqSet -import LazyUniqFM +import UniqFM import Data.List hiding (union) import Data.Maybe diff --git a/compiler/utils/GraphPpr.hs b/compiler/utils/GraphPpr.hs index 0e82b319eb..1df5158dc2 100644 --- a/compiler/utils/GraphPpr.hs +++ b/compiler/utils/GraphPpr.hs @@ -12,7 +12,7 @@ import GraphBase import Outputable import Unique import UniqSet -import LazyUniqFM +import UniqFM import Data.List import Data.Maybe diff --git a/compiler/utils/LazyUniqFM.lhs b/compiler/utils/LazyUniqFM.lhs index b7ac15d2a1..d8132e3cd5 100644 --- a/compiler/utils/LazyUniqFM.lhs +++ b/compiler/utils/LazyUniqFM.lhs @@ -13,9 +13,7 @@ Basically, the things need to be in class @Uniquable@, and we use the \begin{code} {-# OPTIONS -Wall -fno-warn-name-shadowing -Werror -fallow-undecidable-instances #-} module LazyUniqFM ( - UniqFM(..), -- abstract type - -- XXX Not actually abstract because of nativeGen/MachRegs; sigh - Lazy(Lazy), -- XXX Also for nativeGen/MachRegs; sigh + UniqFM, -- abstract type emptyUFM, unitUFM, diff --git a/compiler/utils/UniqSet.lhs b/compiler/utils/UniqSet.lhs index 90e0c9f40b..9a0331547d 100644 --- a/compiler/utils/UniqSet.lhs +++ b/compiler/utils/UniqSet.lhs @@ -22,7 +22,7 @@ module UniqSet ( ) where import Maybes -import LazyUniqFM +import UniqFM import Unique #if ! OMIT_NATIVE_CODEGEN diff --git a/compiler/vectorise/VectType.hs b/compiler/vectorise/VectType.hs index 972aca1b7b..86dcaf236b 100644 --- a/compiler/vectorise/VectType.hs +++ b/compiler/vectorise/VectType.hs @@ -39,7 +39,7 @@ import TysWiredIn import TysPrim ( intPrimTy ) import Unique -import LazyUniqFM +import UniqFM import UniqSet import Util ( singleton ) import Digraph ( SCC(..), stronglyConnComp ) |