Change `-fprof-late` to insert cost centres after unfolding creation.
The former behaviour of adding cost centres after optimization but before unfoldings are created is not available via the flag `prof-late-inline` instead. I also reduced the overhead of -fprof-late* by pushing the cost centres into lambdas. This means the cost centres will only account for execution of functions and not their partial application. Further I made LATE_CC cost centres it's own CC flavour so they now won't clash with user defined ones if a user uses the same string for a custom scc. LateCC: Don't put cost centres inside constructor workers. With -fprof-late they are rarely useful as the worker is usually inlined. Even if the worker is not inlined or we use -fprof-late-linline they are generally not helpful but bloat compile and run time significantly. So we just don't add sccs inside constructor workers. ------------------------- Metric Decrease: T13701 -------------------------
Showing
- compiler/GHC/Cmm/Info/Build.hs 2 additions, 2 deletionscompiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Core/LateCC.hs 119 additions, 23 deletionscompiler/GHC/Core/LateCC.hs
- compiler/GHC/Core/Opt/Pipeline.hs 3 additions, 4 deletionscompiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Driver/CodeOutput.hs 2 additions, 1 deletioncompiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Flags.hs 2 additions, 0 deletionscompiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs 19 additions, 3 deletionscompiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs 3 additions, 0 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/Iface/Tidy.hs 2 additions, 2 deletionscompiler/GHC/Iface/Tidy.hs
- compiler/GHC/Stg/Pipeline.hs 1 addition, 1 deletioncompiler/GHC/Stg/Pipeline.hs
- compiler/GHC/Types/CostCentre.hs 11 additions, 2 deletionscompiler/GHC/Types/CostCentre.hs
- docs/users_guide/debugging.rst 6 additions, 0 deletionsdocs/users_guide/debugging.rst
- docs/users_guide/profiling.rst 33 additions, 5 deletionsdocs/users_guide/profiling.rst
- testsuite/tests/profiling/should_compile/all.T 2 additions, 0 deletionstestsuite/tests/profiling/should_compile/all.T
- testsuite/tests/profiling/should_compile/prof-late-cc3.hs 8 additions, 0 deletionstestsuite/tests/profiling/should_compile/prof-late-cc3.hs
- testsuite/tests/profiling/should_compile/prof-late-cc3.stderr 50 additions, 0 deletions...suite/tests/profiling/should_compile/prof-late-cc3.stderr
- testsuite/tests/profiling/should_compile/prof-late-cc4.hs 5 additions, 0 deletionstestsuite/tests/profiling/should_compile/prof-late-cc4.hs
- testsuite/tests/profiling/should_compile/prof-late-cc4.stderr 18 additions, 0 deletions...suite/tests/profiling/should_compile/prof-late-cc4.stderr
Loading
Please register or sign in to comment