diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-05-10 22:06:51 +0200 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-02-12 13:59:41 +0000 |
commit | 0e93023eef174262310737004d398bc7a606939a (patch) | |
tree | 091a34f78b7911d8b38f414ff8eab90796581c47 /testsuite/tests/stranal | |
parent | 90a26f8b0dd99129d3fd7fe28127cb69abd46328 (diff) | |
download | haskell-0e93023eef174262310737004d398bc7a606939a.tar.gz |
Tag inference work.
This does three major things:
* Enforce the invariant that all strict fields must contain tagged
pointers.
* Try to predict the tag on bindings in order to omit tag checks.
* Allows functions to pass arguments unlifted (call-by-value).
The former is "simply" achieved by wrapping any constructor allocations with
a case which will evaluate the respective strict bindings.
The prediction is done by a new data flow analysis based on the STG
representation of a program. This also helps us to avoid generating
redudant cases for the above invariant.
StrictWorkers are created by W/W directly and SpecConstr indirectly.
See the Note [Strict Worker Ids]
Other minor changes:
* Add StgUtil module containing a few functions needed by, but
not specific to the tag analysis.
-------------------------
Metric Decrease:
T12545
T18698b
T18140
T18923
LargeRecord
Metric Increase:
LargeRecord
ManyAlternatives
ManyConstructors
T10421
T12425
T12707
T13035
T13056
T13253
T13253-spj
T13379
T15164
T18282
T18304
T18698a
T1969
T20049
T3294
T4801
T5321FD
T5321Fun
T783
T9233
T9675
T9961
T19695
WWRec
-------------------------
Diffstat (limited to 'testsuite/tests/stranal')
-rw-r--r-- | testsuite/tests/stranal/should_compile/T20817.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/stranal/sigs/T16859.stderr | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/testsuite/tests/stranal/should_compile/T20817.stderr b/testsuite/tests/stranal/should_compile/T20817.stderr index 49fa683b42..ba364234db 100644 --- a/testsuite/tests/stranal/should_compile/T20817.stderr +++ b/testsuite/tests/stranal/should_compile/T20817.stderr @@ -237,7 +237,7 @@ $wg [InlPrag=[2], Dmd=LCL(C1(C1(C1(C1(C1(C1(!L)))))))] :: forall {a} {b} {c} {d} {e} {t} {t} {t}. Bool -> a -> b -> c -> t -> t -> t -> (# a, b, c, t, t, t #) -[LclId, +[LclId[StrictWorker([!, ~, ~, ~, ~, ~, ~])], Arity=7, Str=<1L><L><L><L><L><L><L>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, @@ -252,7 +252,9 @@ $wg (@t) (@t) (@t) - (ds [Dmd=1L] :: Bool) + (ds [Dmd=1L] + :: Bool + Unf=OtherCon []) (ww :: a) (ww :: b) (ww :: c) diff --git a/testsuite/tests/stranal/sigs/T16859.stderr b/testsuite/tests/stranal/sigs/T16859.stderr index 56c711f807..4e32752e35 100644 --- a/testsuite/tests/stranal/sigs/T16859.stderr +++ b/testsuite/tests/stranal/sigs/T16859.stderr @@ -45,10 +45,10 @@ T16859.$tcName: T16859.$tcNameSort: T16859.$trModule: T16859.bar: <1!A><L> -T16859.baz: <1L><1!L><1C1(L)> +T16859.baz: <L><1!L><1C1(L)> T16859.buz: <1!L> -T16859.foo: <1L><L> -T16859.mkInternalName: <1!L><1L><1L> +T16859.foo: <L><L> +T16859.mkInternalName: <1!L><L><L> T16859.n_loc: <1!P(A,A,A,1L)> T16859.n_occ: <1!P(A,1!L,A,A)> T16859.n_sort: <1!P(1L,A,A,A)> |