summaryrefslogtreecommitdiff
path: root/compiler/coreSyn/CoreUnfold.lhs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-18 14:59:12 +0100
committerIan Lynagh <ian@well-typed.com>2012-10-18 16:01:53 +0100
commitd4a1964300295bfe700caa89f5d28c53eb74bdef (patch)
tree2afbbf41aad8cc65c0a60d859d5cec4e56532bb2 /compiler/coreSyn/CoreUnfold.lhs
parent51da4ee2401983359db9caad3902a98a8f505431 (diff)
downloadhaskell-d4a1964300295bfe700caa89f5d28c53eb74bdef.tar.gz
Refactor the way dump flags are handled
We were being inconsistent about how we tested whether dump flags were enabled; in particular, sometimes we also checked the verbosity, and sometimes we didn't. This lead to oddities such as "ghc -v4" printing an "Asm code" section which didn't contain any code, and "-v4" enabled some parts of "-ddump-deriv" but not others. Now all the tests use dopt, which also takes the verbosity into account as appropriate.
Diffstat (limited to 'compiler/coreSyn/CoreUnfold.lhs')
-rw-r--r--compiler/coreSyn/CoreUnfold.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/coreSyn/CoreUnfold.lhs b/compiler/coreSyn/CoreUnfold.lhs
index b02d06a418..7ed5d2b475 100644
--- a/compiler/coreSyn/CoreUnfold.lhs
+++ b/compiler/coreSyn/CoreUnfold.lhs
@@ -908,7 +908,7 @@ callSiteInline dflags id active_unfolding lone_variable arg_infos cont_info
| active_unfolding -> tryUnfolding dflags id lone_variable
arg_infos cont_info unf_template is_top
is_wf is_exp uf_arity guidance
- | gopt Opt_D_dump_inlinings dflags && gopt Opt_D_verbose_core2core dflags
+ | dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags
-> pprTrace "Inactive unfolding:" (ppr id) Nothing
| otherwise -> Nothing
NoUnfolding -> Nothing
@@ -923,7 +923,7 @@ tryUnfolding dflags id lone_variable
is_wf is_exp uf_arity guidance
-- uf_arity will typically be equal to (idArity id),
-- but may be less for InlineRules
- | gopt Opt_D_dump_inlinings dflags && gopt Opt_D_verbose_core2core dflags
+ | dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags
= pprTrace ("Considering inlining: " ++ showSDocDump dflags (ppr id))
(vcat [text "arg infos" <+> ppr arg_infos,
text "uf arity" <+> ppr uf_arity,