diff options
author | Michael D. Adams <adamsmd@cs.indiana.edu> | 2007-07-17 01:42:57 +0000 |
---|---|---|
committer | Michael D. Adams <adamsmd@cs.indiana.edu> | 2007-07-17 01:42:57 +0000 |
commit | 95e67967d9abbef73e8d355d0e168759b4ee0590 (patch) | |
tree | 4b5b0601420f0b20fb31021bed423d903a9598d2 /compiler/cmm | |
parent | 163efd68fae4e23a2d4182839d776da04c363153 (diff) | |
download | haskell-95e67967d9abbef73e8d355d0e168759b4ee0590.tar.gz |
Factor 'callerSaveVolatileRegs' out of the NCG and into CgUtil
This is needed because CgForeign and parts of the CPS pass now use
'callerSaveVolatileRegs' and not all platforms have access to the NCG.
Diffstat (limited to 'compiler/cmm')
-rw-r--r-- | compiler/cmm/CmmBrokenBlock.hs | 7 | ||||
-rw-r--r-- | compiler/cmm/CmmCPSGen.hs | 7 |
2 files changed, 1 insertions, 13 deletions
diff --git a/compiler/cmm/CmmBrokenBlock.hs b/compiler/cmm/CmmBrokenBlock.hs index f3c992898c..0f732d3a6a 100644 --- a/compiler/cmm/CmmBrokenBlock.hs +++ b/compiler/cmm/CmmBrokenBlock.hs @@ -18,6 +18,7 @@ import CmmUtils import CLabel import MachOp (MachHint(..)) +import CgUtils (callerSaveVolatileRegs) import ClosureInfo import Maybes @@ -27,12 +28,6 @@ import UniqSupply import Unique import UniqFM -import MachRegs (callerSaveVolatileRegs) - -- HACK: this is part of the NCG so we shouldn't use this, but we need - -- it for now to eliminate the need for saved regs to be in CmmCall. - -- The long term solution is to factor callerSaveVolatileRegs - -- from nativeGen into codeGen - -- This module takes a 'CmmBasicBlock' which might have 'CmmCall' -- statements in it with 'CmmSafe' set and breaks it up at each such call. -- It also collects information about the block for later use diff --git a/compiler/cmm/CmmCPSGen.hs b/compiler/cmm/CmmCPSGen.hs index 3b93b0947e..6c9b5a5d9a 100644 --- a/compiler/cmm/CmmCPSGen.hs +++ b/compiler/cmm/CmmCPSGen.hs @@ -17,7 +17,6 @@ import CmmCallConv import CgProf (curCCS, curCCSAddr) import CgUtils (cmmOffsetW) -import CgInfoTbls (entryCode) import SMRep import ForeignCall @@ -29,12 +28,6 @@ import List import Panic -import MachRegs (callerSaveVolatileRegs) - -- HACK: this is part of the NCG so we shouldn't use this, but we need - -- it for now to eliminate the need for saved regs to be in CmmCall. - -- The long term solution is to factor callerSaveVolatileRegs - -- from nativeGen into CPS - -- The format for the call to a continuation -- The fst is the arguments that must be passed to the continuation -- by the continuation's caller. |