[GHC] #12207: CgStaticPointers fails with -O
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: | Operating System: Unknown/Multiple StaticPointers | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: codeGen/should_run/CgStaticPointers| Blocking: | Related Tickets: #11656 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ $ make TEST=CgStaticPointers slow }}} {{{ Wrong exit code (expected 0 , actual 1 ) Stdout: Stderr: CgStaticPointers: couldn't find StaticPtrInfo {spInfoUnitId = "main", spInfoModuleName = "Main", spInfoSrcLoc = (13,21)} CallStack (from HasCallStack): error, called at CgStaticPointers.hs:25:14 in main:Main *** unexpected failure for CgStaticPointers(optasm) }}} This seems to be caused by the patch for #11656 (36d29f7ce332a2b1fbc36de831b0eef7a6405555). -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * priority: normal => high Comment: `GcStaticPointers` and `ListStaticPointers` also also failing for `opt_ways`, but with a different error: {{{ Stderr: GcStaticPointers: user error (Pattern match failure in do expression at GcStaticPointers.hs:29:3-8) }}} `TcStaticPointers01` and `TcStaticPointers02` are failing for `WAY=hpc` with core lint errors: {{{ TcStaticPointers01.hs:14:1: warning: [RHS of f2 :: StaticPtr (Bool -> Bool -> Bool)] Found StaticPtr nested in an expression: StaticPtr @ (Bool -> Bool -> Bool) 12401500612696308948## 14493004878027643444## f2_s1BX f2_s1C3 }}} All four tests pass with ghc-7.10.3 and ghc-8.0.1. Raising priority. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Thomas Miedema <thomasmiedema@…>): In [changeset:"1d938aa3373f464f46dd3806a21aa85dda764ec6/ghc" 1d938aa/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="1d938aa3373f464f46dd3806a21aa85dda764ec6" Testsuite: mark tests expect broken * CgStaticPointers, GcStaticPointers, ListStaticPointers, TcStaticPointers01, TcStaticPointers02: #12207 * T11535: #12210 * ffi017/ffi021: #12209 * T11108: #11108 * T9646: #9646 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): @thomie, thanks for reporting this. Will take a look. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): `CgStaticPointers` and `ListStaticPointers` seem to fail only when compiled with `-O`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * cc: simonpj (added) Comment: With `-O` the `FloatOut` pass places the `StaticPtr` applications at the top level as expected: {{{ lvl_s4Ke lvl_s4Ke = StaticPtr 4472709404834582951## 17755048586376966233## lvl_s4Kc lvl_s4Kd ... staticKey lvl_s4Ke ... }}} However some other core-to-core pass is simplifying `staticKey lvl_s4Ke` and replacing it with `Fingerprint 4472709404834582951## 17755048586376966233##`. This is alright but it also removes the `lvl_s4Ke` binding! Which then cannot be added to the SPT. Any pointers to the code which removes the binding? My first attempt would be to make a special case for bindings to `StaticPtr` applications so they are not removed. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * owner: => facundo.dominguez -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: patch Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2355 Wiki Page: | -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * status: new => patch * differential: => Phab:D2355 Comment: Just submitted a patch to fix the tests failing with `-fhpc`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: patch Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2355 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Facundo Domínguez <facundo.dominguez@…>): In [changeset:"7fc20b02b20c97209b97f0e36d34a4ef40f537a4/ghc" 7fc20b0/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7fc20b02b20c97209b97f0e36d34a4ef40f537a4" Have Core linter accept programs using StaticPointers and -fhpc. Summary: This patch uses collectArgsTicks instead of collectArgs to test that StaticPtr only occurs at the top of RHSs of top-level expressions. Ticks introduced by -fhpc would interfere otherwise. Test Plan: ./validate Reviewers: thomie, austin, goldfire, bgamari, simonpj Reviewed By: simonpj Differential Revision: https://phabricator.haskell.org/D2355 GHC Trac Issues: #12207 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: patch Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2355 Wiki Page: | Phab:D2366 -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * differential: Phab:D2355 => Phab:D2355 Phab:D2366 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: patch Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2355 Wiki Page: | Phab:D2366 -------------------------------------+------------------------------------- Comment (by Facundo Domínguez <facundo.dominguez@…>): In [changeset:"dd92c67be573604290560b93890ce4b8eccd40b3/ghc" dd92c67b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="dd92c67be573604290560b93890ce4b8eccd40b3" Stop the simplifier from removing StaticPtr binds. Summary: We have the FloatOut pass create exported ids for floated StaticPtr bindings. The simplifier doesn't try to remove those. This patch also improves on 7fc20b by making a common definition collectStaticPtrSatArgs to test for StaticPtr binds. Fixes #12207. Test Plan: ./validate Reviewers: simonpj, austin, bgamari, simonmar, goldfire Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2366 GHC Trac Issues: #12207 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12207: CgStaticPointers fails with -O -------------------------------------+------------------------------------- Reporter: thomie | Owner: | facundo.dominguez Type: bug | Status: closed Priority: high | Milestone: Component: Compiler | Version: 8.1 (CodeGen) | Keywords: Resolution: fixed | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | codeGen/should_run/CgStaticPointers Blocked By: | Blocking: Related Tickets: #11656 | Differential Rev(s): Phab:D2355 Wiki Page: | Phab:D2366 -------------------------------------+------------------------------------- Changes (by facundo.dominguez): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC