Add new debugging flag -dinline-check
authorBen Gamari <ben@smart-cactus.org>
Mon, 26 Mar 2018 02:17:24 +0000 (22:17 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 26 Mar 2018 02:18:07 +0000 (22:18 -0400)
commitecfb4d363daf06cda82a4b062eb4798dee99d0e3
treeaa50002268dbf6a45c0f00dfa43934591d9e0353
parent20ae19fc7297dceaefde8d3443099bfd9cd1e905
Add new debugging flag -dinline-check

This flag reports a summary of the inlining decision for identifiers
prefixed by the flag's argument.

For example, `-dinline-check foo` will report why definitions whose
prefix is `foo` are inlined or not.

Previously the only way to get this information was to pass a
combination of `-dverbose-core2core` and `-ddump-inlinings`.

This combination led to a log of 12 million lines in a module of about
200 lines I recently had to apply it to. This flag provides a much more
direct way to find the occurence you care about.

Reviewers: osa1, dfeuer, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4458
compiler/coreSyn/CoreUnfold.hs
compiler/main/DynFlags.hs
docs/users_guide/debugging.rst
testsuite/tests/driver/all.T
testsuite/tests/driver/inline-check.hs [new file with mode: 0644]
testsuite/tests/driver/inline-check.stderr [new file with mode: 0644]