[GHC] #14373: Introduce PTR-tagging for big constructor families

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Currently only ''small'' constructor families come into the benefit of pointer tagging. In big fams, 1 is the tag that says "I am evaluated". I suggest to do best-effort pointer tagging on big families too by this scheme: Ptr-tag 1..6 for the first 6 constructors, 7 would signify "look into the info table and branch on that tag". In the info table the tags will then be 6..(familySize - 1). I have an implementation which I'll submit to fabricator soon. TODOs: update wiki pages. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): See branch `wip/T14373` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by heisenbug): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by heisenbug): `-fcmm-elim-common-blocks` helps a bit, but many equal ones are not caught: These hash the same {{{ hash_block c3dj 170 hash_block c3dp 170 hash_block c3dv 170 hash_block c3dB 170 }}} but are not commoned: {{{ ==================== Post switch plan ==================== {offset c3dj: // global R1 = R1 + 7; call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8; } ==================== Post switch plan ==================== {offset c3dp: // global R1 = R1 + 7; call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8; } ==================== Post switch plan ==================== {offset c3dv: // global R1 = R1 + 7; call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8; } ==================== Post switch plan ==================== {offset c3dB: // global R1 = R1 + 7; call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8; } }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by heisenbug): https://phabricator.haskell.org/D4267 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: heisenbug Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by heisenbug): * owner: (none) => heisenbug -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: heisenbug Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4267 Wiki Page: | -------------------------------------+------------------------------------- Changes (by duog): * differential: => Phab:D4267 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: heisenbug Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: CodeGen Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4267 Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => CodeGen -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14373: Introduce PTR-tagging for big constructor families -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: heisenbug Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: CodeGen Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4267 Wiki Page: | -------------------------------------+------------------------------------- Changes (by osa1): * cc: osa1 (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14373#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC