summaryrefslogtreecommitdiff
path: root/ghc/compiler/codeGen
diff options
context:
space:
mode:
authorsimonmar <unknown>2005-03-24 15:22:33 +0000
committersimonmar <unknown>2005-03-24 15:22:33 +0000
commitacc0fe48c73d06ac3b036da6c7e4fa073178018d (patch)
tree848efb3dd9f88e4bab1f122a690f70416d38d7a9 /ghc/compiler/codeGen
parentd46ae0756c40f090eeecbd4c35338283a32ec957 (diff)
downloadhaskell-acc0fe48c73d06ac3b036da6c7e4fa073178018d.tar.gz
[project @ 2005-03-24 15:22:33 by simonmar]
tweaks to a (commented-out) trace message
Diffstat (limited to 'ghc/compiler/codeGen')
-rw-r--r--ghc/compiler/codeGen/CgUtils.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/ghc/compiler/codeGen/CgUtils.hs b/ghc/compiler/codeGen/CgUtils.hs
index 643c4917b8..535d016e09 100644
--- a/ghc/compiler/codeGen/CgUtils.hs
+++ b/ghc/compiler/codeGen/CgUtils.hs
@@ -462,10 +462,14 @@ mk_switch tag_expr branches mb_deflt lo_tag hi_tag via_C
; return (assign_tag `consCgStmt` (branch_stmt `consCgStmt` hi_stmts))
}
where
- use_switch = ASSERT( n_branches > 1 && n_tags > 1 )
- {- pprTrace "mk_switch" (ppr tag_expr <+> text "n_tags: "
- <+> int n_tags <+> text "dense: "
- <+> int n_branches) $ -}
+ use_switch = {- pprTrace "mk_switch" (
+ ppr tag_expr <+> text "n_tags:" <+> int n_tags <+>
+ text "n_branches:" <+> int n_branches <+>
+ text "lo_tag: " <+> int lo_tag <+>
+ text "hi_tag: " <+> int hi_tag <+>
+ text "real_lo_tag: " <+> int real_lo_tag <+>
+ text "real_hi_tag: " <+> int real_hi_tag) $ -}
+ ASSERT( n_branches > 1 && n_tags > 1 )
n_tags > 2 && (small || dense)
-- a 2-branch switch always turns into an if.
small = n_tags <= 4