patch applied (ghc): Pointer Tagging

Sigbjorn Finne sof at galois.com
Fri Jul 27 14:23:53 EDT 2007


Yes, mighty fine work by the looks of it (just downloaded
the paper); reported speedup numbers are impressive.

Does the commit also turn off vectored returns?

--sigbjorn

On 7/27/2007 07:53, Alexey Rodriguez Yakushev wrote:
> Great! :)
>
> Cheers,
>
> Alexey
>
> On Jul 27, 2007, at 12:46, Simon Marlow wrote:
>
>> Fri Jul 27 03:41:57 PDT 2007  Simon Marlow <simonmar at microsoft.com>
>>   * Pointer Tagging
>>
>>   This patch implements pointer tagging as per our ICFP'07 paper "Faster
>>   laziness using dynamic pointer tagging".  It improves performance by
>>   10-15% for most workloads, including GHC itself.
>>
>>   The original patches were by Alexey Rodriguez Yakushev
>>   <mrchebas at gmail.com>, with additions and improvements by me.  I've
>>   re-recorded the development as a single patch.
>>
>>   The basic idea is this: we use the low 2 bits of a pointer to a heap
>>   object (3 bits on a 64-bit architecture) to encode some information
>>   about the object pointed to.  For a constructor, we encode the "tag"
>>   of the constructor (e.g. True vs. False), for a function closure its
>>   arity.  This enables some decisions to be made without dereferencing
>>   the pointer, which speeds up some common operations.  In particular it
>>   enables us to avoid costly indirect jumps in many cases.
>>
>>   More information in the commentary:
>>
>>   
>> http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging 
>>
>>
>>     M ./compiler/cmm/CmmLint.hs -3 +8
>>     M ./compiler/cmm/PprC.hs -1 +2
>>     M ./compiler/codeGen/CgBindery.lhs -12 +56
>>     M ./compiler/codeGen/CgClosure.lhs -3 +21
>>     M ./compiler/codeGen/CgCon.lhs -9 +18
>>     M ./compiler/codeGen/CgHeapery.lhs +3
>>     M ./compiler/codeGen/CgInfoTbls.hs -3 +22
>>     M ./compiler/codeGen/CgPrimOp.hs -1 +2
>>     M ./compiler/codeGen/CgProf.hs -3 +12
>>     M ./compiler/codeGen/CgTailCall.lhs -3 +63
>>     M ./compiler/codeGen/CgUtils.hs +62
>>     M ./compiler/codeGen/ClosureInfo.lhs -5 +33
>>     M ./compiler/main/Constants.lhs +10
>>     M ./compiler/nativeGen/MachCodeGen.hs +12
>>     M ./includes/Closures.h -1 +2
>>     M ./includes/Cmm.h -4 +41
>>     M ./includes/InfoTables.h -1 +1
>>     M ./includes/MachDeps.h +10
>>     M ./includes/Rts.h +40
>>     M ./includes/Storage.h -1 +1
>>     M ./includes/mkDerivedConstants.c +4
>>     M ./rts/Apply.cmm -10 +24
>>     M ./rts/HeapStackCheck.cmm -9 +23
>>     M ./rts/Interpreter.c -5 +6
>>     M ./rts/PrimOps.cmm -3 +6
>>     M ./rts/RetainerProfile.c -7 +15
>>     M ./rts/RtsAPI.c -17 +21
>>     M ./rts/Sanity.c -6 +11
>>     M ./rts/Sparks.c +6
>>     M ./rts/Stable.c -3 +8
>>     M ./rts/Stats.c +55
>>     M ./rts/StgMiscClosures.cmm -5 +5
>>     M ./rts/StgStartup.cmm +1
>>     M ./rts/StgStdThunks.cmm -5 +24
>>     M ./rts/sm/Compact.c -13 +26
>>     M ./rts/sm/Evac.c -23 +59
>>     M ./rts/sm/GC.c -4 +9
>>     M ./rts/sm/Scav.c -2 +2
>>     M ./utils/genapply/GenApply.hs -12 +107
>>
>> _______________________________________________
>> Cvs-ghc mailing list
>> Cvs-ghc at haskell.org
>> http://www.haskell.org/mailman/listinfo/cvs-ghc
>
> _______________________________________________
> Cvs-ghc mailing list
> Cvs-ghc at haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-ghc



More information about the Cvs-ghc mailing list