diff options
| author | simonpj <unknown> | 2005-05-16 12:40:14 +0000 |
|---|---|---|
| committer | simonpj <unknown> | 2005-05-16 12:40:14 +0000 |
| commit | 94cc5f40a24dc5ada1e9b358868ce7f43f440a47 (patch) | |
| tree | 2f3961ea46e2ec0ecbc7ce7d4f75eda95073d482 | |
| parent | 7f668158a743bdcbe1ad6d0c61bbd5a58812ba2a (diff) | |
| download | haskell-94cc5f40a24dc5ada1e9b358868ce7f43f440a47.tar.gz | |
[project @ 2005-05-16 12:40:14 by simonpj]
Better debug-printing for -ddump-inlinings
| -rw-r--r-- | ghc/compiler/coreSyn/CoreUnfold.lhs | 5 | ||||
| -rw-r--r-- | ghc/compiler/simplCore/Simplify.lhs | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ghc/compiler/coreSyn/CoreUnfold.lhs b/ghc/compiler/coreSyn/CoreUnfold.lhs index 931a1a858b..e7e7da3557 100644 --- a/ghc/compiler/coreSyn/CoreUnfold.lhs +++ b/ghc/compiler/coreSyn/CoreUnfold.lhs @@ -609,10 +609,7 @@ callSiteInline dflags active_inline inline_call occ id arg_infos interesting_con text "is value:" <+> ppr is_value, text "is cheap:" <+> ppr is_cheap, text "guidance" <+> ppr guidance, - text "ANSWER =" <+> if yes_or_no then text "YES" else text "NO", - if yes_or_no then - text "Unfolding =" <+> pprCoreExpr unf_template - else empty]) + text "ANSWER =" <+> if yes_or_no then text "YES" else text "NO"]) result else result diff --git a/ghc/compiler/simplCore/Simplify.lhs b/ghc/compiler/simplCore/Simplify.lhs index 1f88c60b3f..aa008a6888 100644 --- a/ghc/compiler/simplCore/Simplify.lhs +++ b/ghc/compiler/simplCore/Simplify.lhs @@ -1001,6 +1001,13 @@ completeCall env var occ_info cont case maybe_inline of { Just unfolding -- There is an inlining! -> tick (UnfoldingDone var) `thenSmpl_` + (if dopt Opt_D_dump_inlinings dflags then + pprTrace "Inlining done" (vcat [ + text "Before:" <+> ppr var <+> sep (map pprParendExpr args), + text "Inlined fn: " <+> ppr unfolding, + text "Cont: " <+> ppr call_cont]) + else + id) $ makeThatCall env var unfolding args call_cont ; |
