Save a word in the info table on x86_64
Summary: An info table with an SRT normally looks like this: StgWord64 srt_offset StgClosureInfo layout StgWord32 layout StgWord32 has_srt But we only need 32 bits for srt_offset on x86_64, because the small memory model requires that code segments are at most 2GB. So we can optimise this to StgClosureInfo layout StgWord32 layout StgWord32 srt_offset saving a word. We can tell whether the info table has an SRT or not, because zero is not a valid srt_offset, so zero still indicates that there's no SRT. Test Plan: * validate * For results, see D4632. Reviewers: bgamari, niteria, osa1, erikd Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4634
Showing
- compiler/cmm/CmmBuildInfoTables.hs 17 additions, 6 deletionscompiler/cmm/CmmBuildInfoTables.hs
- compiler/cmm/CmmExpr.hs 8 additions, 4 deletionscompiler/cmm/CmmExpr.hs
- compiler/cmm/CmmInfo.hs 29 additions, 15 deletionscompiler/cmm/CmmInfo.hs
- includes/rts/storage/ClosureMacros.h 1 addition, 1 deletionincludes/rts/storage/ClosureMacros.h
- includes/rts/storage/InfoTables.h 39 additions, 9 deletionsincludes/rts/storage/InfoTables.h
- libraries/ghci/GHCi/InfoTable.hsc 2 additions, 2 deletionslibraries/ghci/GHCi/InfoTable.hsc
- rts/RtsAPI.c 1 addition, 1 deletionrts/RtsAPI.c
- rts/sm/Evac.c 2 additions, 2 deletionsrts/sm/Evac.c
- rts/sm/Scav.c 3 additions, 3 deletionsrts/sm/Scav.c
Loading
Please register or sign in to comment