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 | 727fae32ea0b6ca6ebdf1b3137649813e4d7ac3d (patch) | |
tree | 9ee1d6055290f255503287d54ecce59862a6a278 /compiler/nativeGen | |
parent | d6a7aff83282d537e160264604d6703e2698600e (diff) | |
download | haskell-727fae32ea0b6ca6ebdf1b3137649813e4d7ac3d.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.
Diffstat (limited to 'compiler/nativeGen')
-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 |
7 files changed, 12 insertions, 11 deletions
diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index 6d3bf7ca75..e0608cb80c 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -40,7 +40,7 @@ import MachOp import CLabel import State -import UniqFM +import LazyUniqFM import Unique ( Unique, getUnique ) import UniqSupply import List ( groupBy, sortBy ) diff --git a/compiler/nativeGen/MachRegs.lhs b/compiler/nativeGen/MachRegs.lhs index 85c88b2ed3..0174fac0ce 100644 --- a/compiler/nativeGen/MachRegs.lhs +++ b/compiler/nativeGen/MachRegs.lhs @@ -105,7 +105,8 @@ import UniqSet import Constants import FastTypes import FastBool -import UniqFM +import qualified UniqFM as S +import LazyUniqFM #if powerpc_TARGET_ARCH import Data.Word ( Word8, Word16, Word32 ) @@ -518,20 +519,20 @@ worst n classN classC {-# INLINE regClass #-} trivColorable :: RegClass -> UniqSet Reg -> UniqSet Reg -> Bool -trivColorable classN conflicts exclusions +trivColorable classN (MkUniqFM conflicts) (MkUniqFM exclusions) = {-# SCC "trivColorable" #-} let {-# INLINE isSqueesed #-} isSqueesed cI cF ufm = case ufm of - NodeUFM _ _ left right + S.NodeUFM _ _ left right -> case isSqueesed cI cF right of (# s, cI', cF' #) -> case s of False -> isSqueesed cI' cF' left True -> (# True, cI', cF' #) - LeafUFM _ reg + S.LeafUFM _ (Lazy reg) -> case regClass reg of RcInteger -> case cI +# _ILIT(1) of @@ -541,7 +542,7 @@ trivColorable classN conflicts exclusions -> case cF +# _ILIT(1) of cF' -> (# cF' >=# ALLOCATABLE_REGS_DOUBLE, cI, cF' #) - EmptyUFM + S.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 51a0bffbc6..e2e002af35 100644 --- a/compiler/nativeGen/RegAllocColor.hs +++ b/compiler/nativeGen/RegAllocColor.hs @@ -24,7 +24,7 @@ import PprMach import UniqSupply import UniqSet -import UniqFM +import LazyUniqFM import Bag import Outputable import DynFlags diff --git a/compiler/nativeGen/RegAllocLinear.hs b/compiler/nativeGen/RegAllocLinear.hs index e6491b77ee..b333c68d5d 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 UniqFM +import LazyUniqFM import UniqSupply import Outputable import State diff --git a/compiler/nativeGen/RegAllocStats.hs b/compiler/nativeGen/RegAllocStats.hs index 8eb86605ab..9f8415f518 100644 --- a/compiler/nativeGen/RegAllocStats.hs +++ b/compiler/nativeGen/RegAllocStats.hs @@ -30,7 +30,7 @@ import MachInstrs import Cmm import Outputable -import UniqFM +import LazyUniqFM import UniqSet import State diff --git a/compiler/nativeGen/RegLiveness.hs b/compiler/nativeGen/RegLiveness.hs index 9ee98971ba..6f21db8b77 100644 --- a/compiler/nativeGen/RegLiveness.hs +++ b/compiler/nativeGen/RegLiveness.hs @@ -42,7 +42,7 @@ import Digraph import Outputable import Unique import UniqSet -import UniqFM +import LazyUniqFM import UniqSupply import Bag import State diff --git a/compiler/nativeGen/RegSpillCost.hs b/compiler/nativeGen/RegSpillCost.hs index d987937102..b492738238 100644 --- a/compiler/nativeGen/RegSpillCost.hs +++ b/compiler/nativeGen/RegSpillCost.hs @@ -23,7 +23,7 @@ import MachInstrs import MachRegs import Cmm -import UniqFM +import LazyUniqFM import UniqSet import Outputable import State |