diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-10-18 14:59:12 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-10-18 16:01:53 +0100 |
commit | d4a1964300295bfe700caa89f5d28c53eb74bdef (patch) | |
tree | 2afbbf41aad8cc65c0a60d859d5cec4e56532bb2 /compiler/nativeGen/RegAlloc | |
parent | 51da4ee2401983359db9caad3902a98a8f505431 (diff) | |
download | haskell-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/nativeGen/RegAlloc')
-rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs index 57c150b6b0..defe68cff3 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Main.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs @@ -91,9 +91,9 @@ regAlloc_spin dflags spinCount triv regsFree slotsFree debug_codeGraphs code -- intermediate structures in the allocator - otherwise tell the -- allocator to ditch them early so we don't end up creating space leaks. let dump = or - [ gopt Opt_D_dump_asm_regalloc_stages dflags - , gopt Opt_D_dump_asm_stats dflags - , gopt Opt_D_dump_asm_conflicts dflags ] + [ dopt Opt_D_dump_asm_regalloc_stages dflags + , dopt Opt_D_dump_asm_stats dflags + , dopt Opt_D_dump_asm_conflicts dflags ] -- check that we're not running off down the garden path. when (spinCount > maxSpinCount) |