[GHC] #10829: Simplification in the RHS of rules

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: 10528 Differential Revisions: | -------------------------------------+------------------------------------- HERMIT users depend on RULES to specify equational properties. 7.10.2 performed both inlining and simplification in both sides of the rules, meaning they can't really be used for this. This breaks most HERMIT use cases. Note that this behavior was a change from 7.8 and prior, due to this commit: https://git.haskell.org/ghc.git/commitdiff/8af219adb914b292d0f8c737fe0a1e3f7... The following commit disables the inlining/simplification in the LHS of rules, which fixes half the problem, but it has yet to be merged and released (attached to ticket #10528): https://git.haskell.org/ghc.git/commitdiff/bc4b64ca5b99bff6b3d5051b57cb2bc52... This ticket is to ask that inlining/simplification also be disabled in the RHS of rules. As an example of what is happening, we are seeing rules like this: {{{ repH :: [a] -> [a] -> [a] {-# RULES "repH ++" [~] forall xs ys. repH (xs ++ ys) = repH xs . repH ys #-} }}} get to HERMIT as: {{{ "repH ++" forall xs ys. repH (xs ++ ys) = let f = repH xs g = repH ys in \ z -> f (g z) }}} In this case it is just an unfolding of composition, but some rules get rather gross on the RHS. The extra junk makes equational reasoning with these rules very fiddly and sort of breaks the correspondence with the source-level code. For instance, it is almost impossible to apply these right-to-left, which is a common thing to do when performing equational reasoning. Some possible solutions: 1. Don't inline/apply rules in the RHS at all (just like the LHS). 2. Don't inline/apply rules in the RHS of rules marked with the NeverActive notation (rules intended for HERMIT use are generally marked NeverActive). Since NeverActive rules are not applied by GHC anyway, this should actually save compile-time work and not affect real programs/rules. Would either of those be acceptable/possible? Option 1 would be ideal, because it would match the behavior of 7.8 (AFAICT). Option 2 would be sufficient, however. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: -------------------------------------+------------------------------------- Description changed by afarmer: Old description:
HERMIT users depend on RULES to specify equational properties.
7.10.2 performed both inlining and simplification in both sides of the rules, meaning they can't really be used for this. This breaks most HERMIT use cases. Note that this behavior was a change from 7.8 and prior, due to this commit:
https://git.haskell.org/ghc.git/commitdiff/8af219adb914b292d0f8c737fe0a1e3f7...
The following commit disables the inlining/simplification in the LHS of rules, which fixes half the problem, but it has yet to be merged and released (attached to ticket #10528):
https://git.haskell.org/ghc.git/commitdiff/bc4b64ca5b99bff6b3d5051b57cb2bc52...
This ticket is to ask that inlining/simplification also be disabled in the RHS of rules.
As an example of what is happening, we are seeing rules like this:
{{{ repH :: [a] -> [a] -> [a]
{-# RULES "repH ++" [~] forall xs ys. repH (xs ++ ys) = repH xs . repH ys #-} }}}
get to HERMIT as:
{{{ "repH ++" forall xs ys. repH (xs ++ ys) = let f = repH xs g = repH ys in \ z -> f (g z) }}}
In this case it is just an unfolding of composition, but some rules get rather gross on the RHS. The extra junk makes equational reasoning with these rules very fiddly and sort of breaks the correspondence with the source-level code. For instance, it is almost impossible to apply these right-to-left, which is a common thing to do when performing equational reasoning.
Some possible solutions:
1. Don't inline/apply rules in the RHS at all (just like the LHS).
2. Don't inline/apply rules in the RHS of rules marked with the NeverActive notation (rules intended for HERMIT use are generally marked NeverActive). Since NeverActive rules are not applied by GHC anyway, this should actually save compile-time work and not affect real programs/rules.
Would either of those be acceptable/possible? Option 1 would be ideal, because it would match the behavior of 7.8 (AFAICT). Option 2 would be sufficient, however.
New description: HERMIT users depend on RULES to specify equational properties. 7.10.2 performed both inlining and simplification in both sides of the rules, meaning they can't really be used for this. This breaks most HERMIT use cases. Note that this behavior was a change from 7.8 and prior, due to this commit: https://git.haskell.org/ghc.git/commitdiff/8af219adb914b292d0f8c737fe0a1e3f7... The following commit disables the inlining/simplification in the LHS of rules, which fixes half the problem, but it has yet to be merged and released (attached to ticket #10528): https://git.haskell.org/ghc.git/commitdiff/bc4b64ca5b99bff6b3d5051b57cb2bc52... This ticket is to ask that inlining/simplification also be disabled in the RHS of rules. As an example of what is happening, we are seeing rules like this: {{{ repH :: [a] -> [a] -> [a] {-# RULES "repH ++" [~] forall xs ys. repH (xs ++ ys) = repH xs . repH ys #-} }}} get to HERMIT as: {{{ "repH ++" forall xs ys. repH (xs ++ ys) = let f = repH xs g = repH ys in \ z -> f (g z) }}} In this case it is just an unfolding of composition, but some rules get rather gross on the RHS. The extra junk makes equational reasoning with these rules very fiddly and breaks the correspondence with the source- level code. For instance, it is almost impossible to apply these right-to- left, which is a common thing to do when performing equational reasoning. Some possible solutions: 1. Don't inline/apply rules in the RHS at all (just like the LHS). 2. Don't inline/apply rules in the RHS of rules marked with the NeverActive notation (rules intended for HERMIT use are generally marked NeverActive). Since NeverActive rules are not applied by GHC anyway, this should actually save compile-time work and not affect real programs/rules. Would either of those be acceptable/possible? Option 1 would be ideal, because it would match the behavior of 7.8 (AFAICT). Option 2 would be sufficient, however. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by conal): * cc: conal (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): I think that Option 1 would be fine. Could someone try it? * In `Simplify.simplRule`, define `rhs_env = lhs_env`. * Probably rename `updModeForRuleLHS` to `updModeForRule` * Add a `Note` with `updModeForRule` to explain why we also do no inlining on rule RHSs, citing the ticket. * Check that there is no `nofib` impact. Andrew: maybe you can do this? Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by afarmer): Yes I have a patch at home that does this. I'll nofib bench it tonight and report back, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Changes (by afarmer): * differential: => D1246 Comment: Alright, I used the 7.10.2 branch and cherry picked bc4b64ca5b99bff6b3d5051b57cb2bc52bd4c841 (SPJ's "Do not inline or apply rules on LHS of rules") as my nofib base. My patch is in D1246. I used the following nofib command: {{{ make clean && make boot && make -k mode=slow 2>&1 NoFibRuns=30 }}} (as an aside, what does the `-k` do? It was recommended without comment on the nofib wiki page) Full nofib results are attached. To summarize, there was more of a change than I expected, but it seems positive, which was also unexpected. See below for Runtime/Elapsed/Total Mem. Binary Sizes and Allocations were unchanged. Average compile time dropped 3.1%, which was also surprising. Given the surprises, I'm going to re-run on another machine just to check. I didn't dig into any of the outliers to see what the Core looked like. Programs with more than 1% change: {{{ -------------------------------------------------------------------------------- Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- ansi 0.0% 0.0% -1.3% -1.3% 0.0% binary-trees 0.0% 0.0% -3.1% -3.2% 0.0% cacheprof 0.0% -0.1% -2.6% -2.7% +2.2% fannkuch-redux 0.0% 0.0% -1.5% -1.5% 0.0% fasta 0.0% 0.0% -2.3% -2.4% 0.0% fibheaps 0.0% 0.0% -2.5% -2.5% 0.0% fulsom 0.0% 0.0% 0.181 -6.2% -0.2% hidden 0.0% 0.0% -2.2% -2.6% 0.0% ida 0.0% 0.0% +2.4% +2.4% 0.0% knights 0.0% 0.0% -6.4% -6.4% 0.0% maillist 0.0% +0.0% 0.050 +1.8% +1.0% multiplier 0.0% 0.0% -1.4% -1.5% 0.0% n-body 0.0% 0.0% -2.9% -3.0% 0.0% pidigits 0.0% 0.0% -3.5% -3.7% 0.0% power 0.0% 0.0% -2.0% -2.1% 0.0% primes 0.0% 0.0% -1.7% -1.6% 0.0% queens 0.0% 0.0% +1.9% +1.8% 0.0% reverse-complem 0.0% 0.0% -2.2% -2.9% 0.0% scs 0.0% 0.0% -5.1% -5.2% 0.0% wang 0.0% 0.0% +1.3% +1.4% 0.0% -------------------------------------------------------------------------------- Min 0.0% -0.1% -6.4% -6.4% -0.2% Max 0.0% +0.0% +2.4% +2.4% +2.2% Geometric Mean -0.0% -0.0% -0.8% -0.8% +0.0% }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Changes (by afarmer): * Attachment "nofib-results.txt" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Changes (by afarmer): * priority: normal => high -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Changes (by afarmer): * Attachment "nofib-results.txt" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Comment (by afarmer): I reran nofib on a non-laptop machine* and updated the comment above and the attached result output. Let me know what you think. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Comment (by simonpj): Looks fine to me. I'd be happy to add it to 7.10.3. But what about the RHS (see comment:4)? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Comment (by afarmer): Ah, sorry I wasn't clear above. These results are for the changes you suggested in comment:4 (which are in D1426). The comparison is between 7.10.2+the LHS patch and 7.10.2+the LHS patch+D1426. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Comment (by afarmer): (Edit: I originally wrote D1426, I meant D1246.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 10528 | Differential Revisions: D1246 -------------------------------------+------------------------------------- Changes (by afarmer): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Revisions: Phab:D1246 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * differential: D1246 => Phab:D1246 * related: 10528 => #10528 Comment: Changed the Diff and ticket information so that they'll auto-hyperlink. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Revisions: Phab:D1246 -------------------------------------+------------------------------------- Comment (by bgamari): Someone correct me if I'm wrong but it seems like this change carries a bit of risk: Could this not result in a failure in optimization in a library with incorrect phasing annotations? We should definitely check this against Stackage or some similar smoke-test to ensure that libraries with incorrect phasing aren't adversely affected by this change as I don't have much confidence that such a regression would appear in nofib (as we've already seen in the case of `text`). Also, have we looked for Core changes that might explain the regressions seen in comment:6? The runtime regressions shown look as though they may be real; it would be nice to have at least some idea of what is happening here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Revisions: Phab:D1246 -------------------------------------+------------------------------------- Comment (by simonpj): I'd be rather surprised if anything optimises worse after this change. It's only a question of whether the optimisation happens before or after the rule is fired. I've been wrong before, and a smoke test would be good. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Revisions: Phab:D1246 -------------------------------------+------------------------------------- Comment (by afarmer): I'm working on updating test suite so validation passes, and I'm also compiling stackage LTS 3.6 as a smoke test. I'll report back when those things are done. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Revisions: Phab:D1246 -------------------------------------+------------------------------------- Changes (by Roboguy): * cc: Roboguy (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Rev(s): Phab:D1246 -------------------------------------+------------------------------------- Comment (by bgamari): Any updates on this, Andrew? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Rev(s): Phab:D1246 -------------------------------------+------------------------------------- Comment (by afarmer): Rebased onto most recent master and did a `./validate --slow` on both master and this patch. The one additional test that fails is T7785, so I'm looking into it now. {{{ =====> T7785(optasm) 1 of 1 [0, 0, 0] cd ./simplCore/should_compile && "/data/users/anfarmer/head/inplace/bin /ghc-stage2" -c T7785.hs -fforce-recomp -dcore-lint -dcmm-lint -dno-debug- output -no-user-package-db -rtsopts -fno-warn-tabs -fno-warn-missed- specialisations -fno-ghci-history -O -fasm -ddump-rules > T7785.comp.stderr 2>&1 Actual stderr output differs from expected: --- ./simplCore/should_compile/T7785.stderr.normalised 2015-10-06 11:10:41.550769587 -0700 +++ ./simplCore/should_compile/T7785.comp.stderr.normalised 2015-10-06 11:10:41.550769587 -0700 @@ -4,5 +4,3 @@ forall ($dMyFunctor :: MyFunctor []) (irred :: Domain [] Int). shared @ [] $dMyFunctor irred = bar_$sshared -"SPEC/Foo myfmap @ []" [ALWAYS] - forall (tpl :: MyFunctor []). myfmap @ [] tpl = $cmyfmap *** unexpected failure for T7785(optasm) }}} I did a preliminary stackage LTS 3.7 build (with 7.10.2+patch) and it looked positive (everything seemed to be building), but the VM ran out of disk and didn't build the last 300 or so packages. Going to restart that process on another machine and report back. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Rev(s): Phab:D1246 -------------------------------------+------------------------------------- Comment (by afarmer): So it looks like the output for T7785 was changed by SPJ in 45d9a15c4b85a2ed89579106bdafd84accf2cb39, which is the commit that this issue is addressing anyway, so I just changed the output back to what it was before and the test passes. Going to start stackage build soon. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Rev(s): Phab:D1246 Wiki Page: | -------------------------------------+------------------------------------- Comment (by afarmer): Alright, I built 7.10.2+LHS patch+this patch and then used that to build stackage (LTS 3.8) as a smoke test. Every package built and tested (for whatever testing stackage-curator does) successfully. I'll see if I can run benchmark suite on something like text/aeson as a further smoke test, but hopefully this is good to go. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules
-------------------------------------+-------------------------------------
Reporter: afarmer | Owner:
Type: bug | Status: patch
Priority: high | Milestone: 7.10.3
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #10528 | Differential Rev(s): Phab:D1246
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Austin Seipp

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: merge Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Rev(s): Phab:D1246 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10829: Simplification in the RHS of rules -------------------------------------+------------------------------------- Reporter: afarmer | Owner: Type: bug | Status: closed Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10528 | Differential Rev(s): Phab:D1246 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10829#comment:24 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC