myThreadId# is trivial; make it an inline primop
authorSimon Marlow <marlowsd@gmail.com>
Sun, 18 Feb 2018 16:09:19 +0000 (11:09 -0500)
committerBen Gamari <ben@smart-cactus.org>
Sun, 18 Feb 2018 16:57:45 +0000 (11:57 -0500)
commitc05529c2219d12ee950eb8972e1aca135cd8e032
tree557d1615f569d8448da5f3c0f96434d45e064a09
parentccda4862102104e080a200e4d9c2ca8f42eb5b70
myThreadId# is trivial; make it an inline primop

The pattern `threadCapability =<< myThreadId` is used a lot in code
that uses `hs_try_putmvar`, I want to make it cheaper.

Test Plan: validate

Reviewers: bgamari, erikd

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4381
compiler/codeGen/StgCmmPrim.hs
compiler/prelude/primops.txt.pp
rts/PrimOps.cmm
rts/RtsSymbols.c