From 6bb5d279e5132e73ad1823d645b10c451264aa78 Mon Sep 17 00:00:00 2001 From: Adam Gundry Date: Sat, 13 May 2023 18:43:16 +0200 Subject: Directed coercions This patch introduces a slimmer version of coercions, directed coercions, which store fewer types within them. This more compact representation considerably speeds up programs which involve many type family reductions, as the coercion size no longer grows quadratically in the number of reduction steps. ------------------------- Metric Decrease: LargeRecord T12227 T12545 T13386 T3064 T5030 T8095 T9872a T9872b T9872b_defer T9872c T9872d Metric Increase: CoOpt_Singletons T18223 T9872a T9872b T9872c T9872d ------------------------- --- compiler/GHC/Core/Opt/Pipeline.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/GHC/Core/Opt/Pipeline.hs') diff --git a/compiler/GHC/Core/Opt/Pipeline.hs b/compiler/GHC/Core/Opt/Pipeline.hs index 0761691f84..7e626bb374 100644 --- a/compiler/GHC/Core/Opt/Pipeline.hs +++ b/compiler/GHC/Core/Opt/Pipeline.hs @@ -199,7 +199,7 @@ getCoreToDo dflags hpt_rule_base extra_vars runWhen (profiling && gopt Opt_ProfLateInlineCcs dflags) $ CoreAddLateCcs core_todo = - [ + [ -- We want to do the static argument transform before full laziness as it -- may expose extra opportunities to float things outwards. However, to fix -- up the output of the transformation we need at do at least one simplify -- cgit v1.2.1