[GHC] #7771: RTS should provide stg_sel_n_noupd_closure

#7771: RTS should provide stg_sel_n_noupd_closure ---------------------------------+------------------------------------------ Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ In `StgStdThunks.cmm` we define info tables `stg_sel_1_upd_info`, etc, for "selector thunks", thus: {{{ #define SELECTOR_CODE_UPD(offset) \ INFO_TABLE_SELECTOR(stg_sel_##offset##_upd, offset, THUNK_SELECTOR, "stg_sel_upd", "stg_sel_upd") \ (P_ node) \ ...etc... }}} But we should ALSO define info tables for ''non-updatable'' selector thunks, thus `stg_sel_1_nonupd_info` etc. We didn't generate any such selectors before, but now I'm implementing cardinality analysis, we are. Would it be possible to beef up this macro to to generate both info tables? Simply omit the update for the `nonupd` version. (It wasn't quite obvious to me how to do this.) That would allow me to get rid of this hack in `CLabel` {{{ pprCLbl (RtsLabel (RtsSelectorInfoTable _upd_reqd offset)) = hcat [ptext (sLit "stg_sel_"), text (show offset), ptext (sLit "_upd_info") -- RTS only has updatable selector thunks at the moment -- so we use just them -- ptext (if upd_reqd -- then (sLit "_upd_info") -- else (sLit "_noupd_info")) ] }}} Thanks -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7771 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7771: RTS should provide stg_sel_n_noupd_closure ---------------------------------+------------------------------------------ Reporter: simonpj | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by simonpj): * owner: => simonmar -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7771#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7771: RTS should provide stg_sel_n_noupd_closure ---------------------------------+------------------------------------------ Reporter: simonpj | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by ezyang): Erm, isn't that what this macro does? {{{#define SELECTOR_CODE_NOUPD(offset) \ INFO_TABLE_SELECTOR(stg_sel_##offset##_noupd, offset, THUNK_SELECTOR, "stg_sel_noupd", "stg_sel_noupd") \ (P_ node) \ { \ }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7771#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7771: RTS should provide stg_sel_n_noupd_closure ---------------------------------+------------------------------------------ Reporter: simonpj | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by simonpj): * owner: simonmar => simonpj Comment: Erm, yes. You're right, and I missed that. Now I have go to back to figure out why I'm getting undefined symbols. I'll reassign the ticket to me! -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7771#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7771: RTS should provide stg_sel_n_noupd_closure ---------------------------------+------------------------------------------ Reporter: simonpj | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by ezyang): My guess is that they’re not in `rts/Linker.c`, unlike the `upd` info- tables (and probably we never caught this because no one is using them!) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7771#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7771: RTS should provide stg_sel_n_noupd_closure ---------------------------------+------------------------------------------ Reporter: simonpj | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * milestone: => 7.8.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7771#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC