summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/GHC/Core/Unfold.hs2
-rw-r--r--compiler/GHC/Driver/Flags.hs1
-rw-r--r--compiler/GHC/Driver/Session.hs3
-rw-r--r--docs/users_guide/debugging.rst15
4 files changed, 15 insertions, 6 deletions
diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs
index 93b41c1c3b..603f3383c5 100644
--- a/compiler/GHC/Core/Unfold.hs
+++ b/compiler/GHC/Core/Unfold.hs
@@ -1130,7 +1130,7 @@ traceInline logger dflags inline_id str doc result
| otherwise = result
where
enable
- | dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags
+ | dopt Opt_D_dump_verbose_inlinings dflags
= True
| Just prefix <- inlineCheck dflags
= prefix `isPrefixOf` occNameString (getOccName inline_id)
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs
index 393927e1b2..cdd5263588 100644
--- a/compiler/GHC/Driver/Flags.hs
+++ b/compiler/GHC/Driver/Flags.hs
@@ -55,6 +55,7 @@ data DumpFlag
| Opt_D_dump_ds_preopt
| Opt_D_dump_foreign
| Opt_D_dump_inlinings
+ | Opt_D_dump_verbose_inlinings
| Opt_D_dump_rule_firings
| Opt_D_dump_rule_rewrites
| Opt_D_dump_simpl_trace
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 26ae0c6e0d..c2d1bed546 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -1418,6 +1418,7 @@ dopt f dflags = (f `EnumSet.member` dumpFlags dflags)
enableIfVerbose Opt_D_dump_simpl_trace = False
enableIfVerbose Opt_D_dump_rtti = False
enableIfVerbose Opt_D_dump_inlinings = False
+ enableIfVerbose Opt_D_dump_verbose_inlinings = False
enableIfVerbose Opt_D_dump_core_stats = False
enableIfVerbose Opt_D_dump_asm_stats = False
enableIfVerbose Opt_D_dump_types = False
@@ -2388,6 +2389,8 @@ dynamic_flags_deps = [
(setDumpFlag Opt_D_dump_foreign)
, make_ord_flag defGhcFlag "ddump-inlinings"
(setDumpFlag Opt_D_dump_inlinings)
+ , make_ord_flag defGhcFlag "ddump-verbose-inlinings"
+ (setDumpFlag Opt_D_dump_verbose_inlinings)
, make_ord_flag defGhcFlag "ddump-rule-firings"
(setDumpFlag Opt_D_dump_rule_firings)
, make_ord_flag defGhcFlag "ddump-rule-rewrites"
diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst
index d8a024dde4..9e6664c152 100644
--- a/docs/users_guide/debugging.rst
+++ b/docs/users_guide/debugging.rst
@@ -332,13 +332,18 @@ subexpression elimination pass.
Dump simplifier output (Core-to-Core passes)
.. ghc-flag:: -ddump-inlinings
- :shortdesc: Dump inlining info
+ :shortdesc: Dump inlinings performed by the simplifier.
:type: dynamic
- Dumps inlining info from the simplifier. Note that if used in
- conjunction with :ghc-flag:`-dverbose-core2core` the compiler will
- also dump the inlinings that it considers but passes up, along with
- its rationale.
+ Dumps inlinings performed by the simplifier.
+
+.. ghc-flag:: -ddump-verbose-inlinings
+ :shortdesc: Dump all considered inlinings
+ :type: dynamic
+
+ Dumps all inlinings considered by the simplifier, even those ultimately not
+ performed. This output includes various information that the simplifier uses
+ to determine whether the inlining is beneficial.
.. ghc-flag:: -ddump-stranal
:shortdesc: Dump demand analysis output