projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved specialisation of recursive groups
[ghc-hetmet.git]
/
compiler
/
cmm
/
Cmm.hs
diff --git
a/compiler/cmm/Cmm.hs
b/compiler/cmm/Cmm.hs
index
3fd5e44
..
9dcaf84
100644
(file)
--- a/
compiler/cmm/Cmm.hs
+++ b/
compiler/cmm/Cmm.hs
@@
-18,19
+18,16
@@
module Cmm (
CmmReturnInfo(..),
CmmStmt(..), CmmActual, CmmActuals, CmmFormal, CmmFormals, CmmKind,
CmmFormalsWithoutKinds, CmmFormalWithoutKind,
CmmReturnInfo(..),
CmmStmt(..), CmmActual, CmmActuals, CmmFormal, CmmFormals, CmmKind,
CmmFormalsWithoutKinds, CmmFormalWithoutKind,
- CmmHinted(..),
+ CmmKinded(..),
CmmSafety(..),
CmmCallTarget(..),
CmmStatic(..), Section(..),
module CmmExpr,
CmmSafety(..),
CmmCallTarget(..),
CmmStatic(..), Section(..),
module CmmExpr,
-
- BlockId(..), mkBlockId,
- BlockEnv, emptyBlockEnv, lookupBlockEnv, extendBlockEnv, mkBlockEnv,
- BlockSet, emptyBlockSet, elemBlockSet, extendBlockSet,
) where
#include "HsVersions.h"
) where
#include "HsVersions.h"
+import BlockId
import CmmExpr
import MachOp
import CLabel
import CmmExpr
import MachOp
import CLabel
@@
-42,10
+39,6
@@
import FastString
import Data.Word
import Data.Word
-import ZipCfg ( BlockId(..), mkBlockId
- , BlockEnv, emptyBlockEnv, lookupBlockEnv, extendBlockEnv, mkBlockEnv
- , BlockSet, emptyBlockSet, elemBlockSet, extendBlockSet
- )
-- A [[BlockId]] is a local label.
-- Local labels must be unique within an entire compilation unit, not
-- A [[BlockId]] is a local label.
-- Local labels must be unique within an entire compilation unit, not
@@
-190,7
+183,7
@@
type ConstrDescription = CmmLit
type FunType = StgHalfWord
type FunArity = StgHalfWord
type SlowEntry = CmmLit
type FunType = StgHalfWord
type FunArity = StgHalfWord
type SlowEntry = CmmLit
- -- ^We would like this to be a CLabel but
+ -- We would like this to be a CLabel but
-- for now the parser sets this to zero on an INFO_TABLE_FUN.
type SelectorOffset = StgWord
-- for now the parser sets this to zero on an INFO_TABLE_FUN.
type SelectorOffset = StgWord
@@
-241,10
+234,10
@@
data CmmStmt
CmmActuals -- with these return values.
type CmmKind = MachHint
CmmActuals -- with these return values.
type CmmKind = MachHint
-data CmmHinted a = CmmHinted { hintlessCmm :: a, cmmHint :: CmmKind }
+data CmmKinded a = CmmKinded { kindlessCmm :: a, cmmKind :: CmmKind }
deriving (Eq)
deriving (Eq)
-type CmmActual = CmmHinted CmmExpr
-type CmmFormal = CmmHinted LocalReg
+type CmmActual = CmmKinded CmmExpr
+type CmmFormal = CmmKinded LocalReg
type CmmActuals = [CmmActual]
type CmmFormals = [CmmFormal]
type CmmFormalWithoutKind = LocalReg
type CmmActuals = [CmmActual]
type CmmFormals = [CmmFormal]
type CmmFormalWithoutKind = LocalReg
@@
-253,8
+246,8
@@
type CmmFormalsWithoutKinds = [CmmFormalWithoutKind]
data CmmSafety = CmmUnsafe | CmmSafe C_SRT
-- | enable us to fold used registers over 'CmmActuals' and 'CmmFormals'
data CmmSafety = CmmUnsafe | CmmSafe C_SRT
-- | enable us to fold used registers over 'CmmActuals' and 'CmmFormals'
-instance UserOfLocalRegs a => UserOfLocalRegs (CmmHinted a) where
- foldRegsUsed f set (CmmHinted a _) = foldRegsUsed f set a
+instance UserOfLocalRegs a => UserOfLocalRegs (CmmKinded a) where
+ foldRegsUsed f set (CmmKinded a _) = foldRegsUsed f set a
instance UserOfLocalRegs CmmStmt where
foldRegsUsed f set s = stmt s set
instance UserOfLocalRegs CmmStmt where
foldRegsUsed f set s = stmt s set
@@
-274,10
+267,13
@@
instance UserOfLocalRegs CmmCallTarget where
foldRegsUsed f set (CmmCallee e _) = foldRegsUsed f set e
foldRegsUsed _ set (CmmPrim {}) = set
foldRegsUsed f set (CmmCallee e _) = foldRegsUsed f set e
foldRegsUsed _ set (CmmPrim {}) = set
+instance DefinerOfLocalRegs a => DefinerOfLocalRegs (CmmKinded a) where
+ foldRegsDefd f z (CmmKinded x _) = foldRegsDefd f z x
+
--just look like a tuple, since it was a tuple before
-- ... is that a good idea? --Isaac Dupree
--just look like a tuple, since it was a tuple before
-- ... is that a good idea? --Isaac Dupree
-instance (Outputable a) => Outputable (CmmHinted a) where
- ppr (CmmHinted a k) = ppr (a, k)
+instance (Outputable a) => Outputable (CmmKinded a) where
+ ppr (CmmKinded a k) = ppr (a, k)
{-
Discussion
{-
Discussion
@@
-334,6
+330,7
@@
data CmmCallTarget
| CmmPrim -- Call a "primitive" (eg. sin, cos)
CallishMachOp -- These might be implemented as inline
-- code by the backend.
| CmmPrim -- Call a "primitive" (eg. sin, cos)
CallishMachOp -- These might be implemented as inline
-- code by the backend.
+ deriving Eq
-----------------------------------------------------------------------------
-- Static Data
-----------------------------------------------------------------------------
-- Static Data