summaryrefslogtreecommitdiff
path: root/compiler/cmm/PprCmmZ.hs
diff options
context:
space:
mode:
authordias@eecs.harvard.edu <unknown>2008-05-29 09:48:27 +0000
committerdias@eecs.harvard.edu <unknown>2008-05-29 09:48:27 +0000
commit25628e2771424cae1b3366322e8ce6f8a85440f9 (patch)
tree98c7d5c5f397263cb218f565b24521d6006235f6 /compiler/cmm/PprCmmZ.hs
parentf0ffb7da8edb184558ab6fb5e0a9899f89572333 (diff)
downloadhaskell-25628e2771424cae1b3366322e8ce6f8a85440f9.tar.gz
Cmm back end upgrades
Several changes in this patch, partially bug fixes, partially new code: o bug fixes in ZipDataflow - added some checks to verify that facts converge - removed some erroneous checks of convergence on entry nodes - added some missing applications of transfer functions o changed dataflow clients to use ZipDataflow, making ZipDataflow0 obsolete o eliminated DFA monad (no need for separate analysis and rewriting monads with ZipDataflow) o started stack layout changes - no longer generating CopyIn and CopyOut nodes (not yet fully expunged though) - still not using proper calling conventions o simple new optimizations: - common block elimination -- have not yet tried to move the Adams opt out of CmmProcPointZ - block concatenation o piped optimization fuel up to the HscEnv - can be limited by a command-line flag - not tested, and probably not yet properly used by clients o added unique supply to FuelMonad, also lifted unique supply to DFMonad
Diffstat (limited to 'compiler/cmm/PprCmmZ.hs')
-rw-r--r--compiler/cmm/PprCmmZ.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/cmm/PprCmmZ.hs b/compiler/cmm/PprCmmZ.hs
index 0359fe2bd2..4e9d2b673e 100644
--- a/compiler/cmm/PprCmmZ.hs
+++ b/compiler/cmm/PprCmmZ.hs
@@ -9,6 +9,7 @@ import CmmExpr
import ForeignCall
import PprCmm
import Outputable
+import StackSlot
import qualified ZipCfgCmmRep as G
import qualified ZipCfg as Z
import CmmZipUtil
@@ -93,19 +94,19 @@ pprCmmGraphLikeCmm g = vcat (swallow blocks)
Just (conv, args) -> endblock (ppr (G.CopyOut conv args) $$
text "// <exit>")
preds = zipPreds g
- entry_has_no_pred = case Z.lookupBlockEnv preds (Z.lg_entry g) of
+ entry_has_no_pred = case lookupBlockEnv preds (Z.lg_entry g) of
Nothing -> True
Just s -> isEmptyUniqSet s
single_preds =
let add b single =
let id = Z.blockId b
- in case Z.lookupBlockEnv preds id of
+ in case lookupBlockEnv preds id of
Nothing -> single
Just s -> if sizeUniqSet s == 1 then
- Z.extendBlockSet single id
+ extendBlockSet single id
else single
- in Z.fold_blocks add Z.emptyBlockSet g
- unique_pred id = Z.elemBlockSet id single_preds
+ in Z.fold_blocks add emptyBlockSet g
+ unique_pred id = elemBlockSet id single_preds
cconv_of_conv (G.ConventionStandard conv _) = conv
cconv_of_conv (G.ConventionPrivate {}) = CmmCallConv -- XXX totally bogus