diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2017-09-10 16:10:37 +0100 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2017-09-12 11:01:10 -0400 |
commit | fe04f3783b662c52c4a0ff36b2d62a7a575998a5 (patch) | |
tree | 3a49d515bc700562621bb0d97a74a89bd0d174fb /testsuite/tests/roles | |
parent | fe35b85a8cc72582e0f98a3059be00a9a2318a4a (diff) | |
download | haskell-fe04f3783b662c52c4a0ff36b2d62a7a575998a5.tar.gz |
Allow CSE'ing of work-wrapped bindings (#14186)
the worker/wrapper creates an artificial INLINE pragma, which caused CSE
to not do its work. We now recognize such artificial pragmas by using
`NoUserInline` instead of `Inline` as the `InlineSpec`.
Differential Revision: https://phabricator.haskell.org/D3939
Diffstat (limited to 'testsuite/tests/roles')
-rw-r--r-- | testsuite/tests/roles/should_compile/Roles1.stderr | 45 | ||||
-rw-r--r-- | testsuite/tests/roles/should_compile/Roles14.stderr | 15 | ||||
-rw-r--r-- | testsuite/tests/roles/should_compile/Roles2.stderr | 16 | ||||
-rw-r--r-- | testsuite/tests/roles/should_compile/Roles3.stderr | 30 | ||||
-rw-r--r-- | testsuite/tests/roles/should_compile/Roles4.stderr | 23 | ||||
-rw-r--r-- | testsuite/tests/roles/should_compile/T8958.stderr | 27 |
6 files changed, 81 insertions, 75 deletions
diff --git a/testsuite/tests/roles/should_compile/Roles1.stderr b/testsuite/tests/roles/should_compile/Roles1.stderr index dd2f16d463..4b9b553b68 100644 --- a/testsuite/tests/roles/should_compile/Roles1.stderr +++ b/testsuite/tests/roles/should_compile/Roles1.stderr @@ -22,7 +22,7 @@ TYPE CONSTRUCTORS COERCION AXIOMS Dependent modules: [] Dependent packages: [base-4.10.0.0, ghc-prim-0.5.1.0, - integer-gmp-1.0.0.1] + integer-gmp-1.0.1.0] ==================== Typechecker ==================== Roles1.$tcT7 @@ -137,36 +137,37 @@ Roles1.$tc'K1 (GHC.Types.TrNameS "'K1"#) 1 $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 1 -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0 -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0 -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 1 -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 2 -$krep [InlPrag=[~]] = GHC.Types.KindRepApp $krep $krep -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 1 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 0 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 0 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 1 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 2 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepApp $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep GHC.Types.krep$*Arr* -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep GHC.Types.krep$* -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] + = GHC.Types.KindRepFun $krep GHC.Types.krep$* +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun GHC.Types.krep$*Arr* GHC.Types.krep$*Arr* -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles1.$tcT7 ((:) $krep ((:) $krep ((:) $krep []))) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles1.$tcT6 ((:) $krep ((:) $krep [])) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles1.$tcT4 ((:) $krep ((:) $krep [])) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles1.$tcT3 ((:) $krep ((:) $krep [])) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles1.$tcT5 ((:) $krep []) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles1.$tcT2 ((:) $krep []) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles1.$tcT1 ((:) $krep []) Roles1.$trModule = GHC.Types.Module diff --git a/testsuite/tests/roles/should_compile/Roles14.stderr b/testsuite/tests/roles/should_compile/Roles14.stderr index 432d936d9e..de25f649ea 100644 --- a/testsuite/tests/roles/should_compile/Roles14.stderr +++ b/testsuite/tests/roles/should_compile/Roles14.stderr @@ -9,7 +9,7 @@ COERCION AXIOMS axiom Roles12.N:C2 :: C2 a = a -> a -- Defined at Roles14.hs:6:1 Dependent modules: [] Dependent packages: [base-4.10.0.0, ghc-prim-0.5.1.0, - integer-gmp-1.0.0.1] + integer-gmp-1.0.1.0] ==================== Typechecker ==================== Roles12.$tcC2 @@ -28,13 +28,14 @@ Roles12.$tc'C:C2 (GHC.Types.TrNameS "'C:C2"#) 1 $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0 -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun GHC.Types.krep$* $krep -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 0 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] + = GHC.Types.KindRepFun GHC.Types.krep$* $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Types.$tcConstraint [] -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles12.$tcC2 ((:) $krep []) Roles12.$trModule = GHC.Types.Module diff --git a/testsuite/tests/roles/should_compile/Roles2.stderr b/testsuite/tests/roles/should_compile/Roles2.stderr index 6f77024162..591691f365 100644 --- a/testsuite/tests/roles/should_compile/Roles2.stderr +++ b/testsuite/tests/roles/should_compile/Roles2.stderr @@ -8,7 +8,7 @@ TYPE CONSTRUCTORS COERCION AXIOMS Dependent modules: [] Dependent packages: [base-4.10.0.0, ghc-prim-0.5.1.0, - integer-gmp-1.0.0.1] + integer-gmp-1.0.1.0] ==================== Typechecker ==================== Roles2.$tcT2 @@ -43,16 +43,16 @@ Roles2.$tc'K1 (GHC.Types.TrNameS "'K1"#) 1 $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0 -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 0 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Ptr.$tcFunPtr ((:) $krep []) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles2.$tcT2 ((:) $krep []) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Types.$tcIO ((:) $krep []) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles2.$tcT1 ((:) $krep []) Roles2.$trModule = GHC.Types.Module diff --git a/testsuite/tests/roles/should_compile/Roles3.stderr b/testsuite/tests/roles/should_compile/Roles3.stderr index 4a9299772d..67146c7662 100644 --- a/testsuite/tests/roles/should_compile/Roles3.stderr +++ b/testsuite/tests/roles/should_compile/Roles3.stderr @@ -30,7 +30,7 @@ COERCION AXIOMS C4 a b = a -> F4 b -> F4 b -- Defined at Roles3.hs:18:1 Dependent modules: [] Dependent packages: [base-4.10.0.0, ghc-prim-0.5.1.0, - integer-gmp-1.0.0.1] + integer-gmp-1.0.1.0] ==================== Typechecker ==================== Roles3.$tcC4 @@ -81,24 +81,26 @@ Roles3.$tc'C:C1 (GHC.Types.TrNameS "'C:C1"#) 1 $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0 -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 1 -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun GHC.Types.krep$* $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun GHC.Types.krep$* $krep -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 0 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 1 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] + = GHC.Types.KindRepFun GHC.Types.krep$* $krep +$krep [InlPrag=NOUSERINLINE[~]] + = GHC.Types.KindRepFun GHC.Types.krep$* $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Types.$tcConstraint [] -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Data.Type.Equality.$tc~ ((:) GHC.Types.krep$* ((:) $krep ((:) $krep []))) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles3.$tcC2 ((:) $krep ((:) $krep [])) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles3.$tcC1 ((:) $krep []) Roles3.$trModule = GHC.Types.Module diff --git a/testsuite/tests/roles/should_compile/Roles4.stderr b/testsuite/tests/roles/should_compile/Roles4.stderr index 7a61af6f5a..4f7598c7fd 100644 --- a/testsuite/tests/roles/should_compile/Roles4.stderr +++ b/testsuite/tests/roles/should_compile/Roles4.stderr @@ -15,7 +15,7 @@ COERCION AXIOMS C3 a = a -> Syn1 a -- Defined at Roles4.hs:11:1 Dependent modules: [] Dependent packages: [base-4.10.0.0, ghc-prim-0.5.1.0, - integer-gmp-1.0.0.1] + integer-gmp-1.0.1.0] ==================== Typechecker ==================== Roles4.$tcC3 @@ -50,19 +50,20 @@ Roles4.$tc'C:C1 (GHC.Types.TrNameS "'C:C1"#) 1 $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0 -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun GHC.Types.krep$* $krep -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 0 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] + = GHC.Types.KindRepFun GHC.Types.krep$* $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Types.$tc[] ((:) $krep []) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Types.$tcConstraint [] -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles4.$tcC3 ((:) $krep []) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp Roles4.$tcC1 ((:) $krep []) Roles4.$trModule = GHC.Types.Module diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr index 117cea60b4..2e83e30199 100644 --- a/testsuite/tests/roles/should_compile/T8958.stderr +++ b/testsuite/tests/roles/should_compile/T8958.stderr @@ -17,7 +17,7 @@ INSTANCES instance [incoherent] Nominal a -- Defined at T8958.hs:7:10 Dependent modules: [] Dependent packages: [base-4.10.0.0, ghc-prim-0.5.1.0, - integer-gmp-1.0.0.1] + integer-gmp-1.0.1.0] ==================== Typechecker ==================== T8958.$tcMap @@ -68,32 +68,33 @@ T8958.$tc'C:Nominal (GHC.Types.TrNameS "'C:Nominal"#) 1 $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0 -$krep [InlPrag=[~]] = GHC.Types.KindRepVar 1 -$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep -$krep [InlPrag=[~]] = GHC.Types.KindRepFun GHC.Types.krep$* $krep -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 0 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 1 +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep +$krep [InlPrag=NOUSERINLINE[~]] + = GHC.Types.KindRepFun GHC.Types.krep$* $krep +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Tuple.$tc(,) ((:) @ GHC.Types.KindRep $krep ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep)) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp T8958.$tcMap ((:) @ GHC.Types.KindRep $krep ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep)) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Types.$tc[] ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp GHC.Types.$tcConstraint [] @ GHC.Types.KindRep -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp T8958.$tcRepresentational ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep) -$krep [InlPrag=[~]] +$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepTyConApp T8958.$tcNominal ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep) @@ -103,7 +104,7 @@ T8958.$trModule AbsBinds [a] [] {Exports: [T8958.$fRepresentationala <= $dRepresentational wrap: <>] - Exported types: T8958.$fRepresentationala [InlPrag=CONLIKE] + Exported types: T8958.$fRepresentationala [InlPrag=NOUSERINLINE CONLIKE] :: forall a. Representational a [LclIdX[DFunId], Unf=DFun: \ (@ a) -> T8958.C:Representational TYPE: a] @@ -112,7 +113,7 @@ AbsBinds [a] [] AbsBinds [a] [] {Exports: [T8958.$fNominala <= $dNominal wrap: <>] - Exported types: T8958.$fNominala [InlPrag=CONLIKE] + Exported types: T8958.$fNominala [InlPrag=NOUSERINLINE CONLIKE] :: forall a. Nominal a [LclIdX[DFunId], Unf=DFun: \ (@ a) -> T8958.C:Nominal TYPE: a] Binds: $dNominal = T8958.C:Nominal @ a |