summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmExtCode.hs
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2018-11-30 17:18:45 +0100
committerSebastian Graf <sebastian.graf@kit.edu>2018-11-30 17:18:46 +0100
commitf10df65fa2c9a5ec2f4c09b97e02e87c377beac3 (patch)
tree19b624d6f41ee0554c693ce4fe47a494ed38ac24 /compiler/codeGen/StgCmmExtCode.hs
parent47875bd4d79ca633b589e63e320aa5a5c631d096 (diff)
downloadhaskell-f10df65fa2c9a5ec2f4c09b97e02e87c377beac3.tar.gz
Deduplicate decision to count thunks in `-ticky`
Summary: Previously, the logic that checks whether a thunk has a counter or not was duplicated in multiple functions. This led to thunk enters being accounted to their enclosing functions in `StgCmmTicky.tickyEnterThunk`, because the outer call to `withNewTickyCounterThunk` didn't set the counter label for the thunk. And rightly so! `tickyEnterThunk` should only account thunk enters to a counter if `-ticky-dyn-thunk` is on. This patch extracts the logic that was already present in its most general form in `withNewTickyCounterThunk` into its own functions and lets all other call sites checking for `-ticky-dyn-thunk` call this new function named `thunkHasCounter` instead. Reviewers: bgamari, simonmar Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5392
Diffstat (limited to 'compiler/codeGen/StgCmmExtCode.hs')
0 files changed, 0 insertions, 0 deletions