Fix histograms for ticky code
authorMateusz Lenik <mlen@mlen.pl>
Tue, 17 May 2016 06:33:54 +0000 (08:33 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 25 Jul 2016 15:06:07 +0000 (17:06 +0200)
commitf0eb4f7a1a63da057016fb93f009c7b57f481096
treecb96cca4cdf45112f19f5902933a1765cf6e5988
parentb4bdbe4957ae8b82c4cda5584203b44d3c4f004f
Fix histograms for ticky code

This patch fixes Cmm generation required to produce histograms when
compiling with -ticky flag, strips dead code from rts/Ticky.c and
reworks it to use a shared constant in both C and Haskell code.

Fixes #8308.

Test Plan: T8308

Reviewers: jstolarek, simonpj, austin

Reviewed By: simonpj

Subscribers: mpickering, simonpj, bgamari, mlen, thomie, jstolarek

Differential Revision: https://phabricator.haskell.org/D931

GHC Trac Issues: #8308

(cherry picked from commit f0f0ac859257a0b528815adb61d3f024c8bafa16)
compiler/codeGen/StgCmmExpr.hs
compiler/codeGen/StgCmmTicky.hs
includes/stg/Ticky.h
rts/RtsSymbols.c
rts/Ticky.c
testsuite/tests/rts/T8308/Makefile [new file with mode: 0644]
testsuite/tests/rts/T8308/T8308.hs [new file with mode: 0644]
testsuite/tests/rts/T8308/T8308.stdout [new file with mode: 0644]
testsuite/tests/rts/T8308/all.T [new file with mode: 0644]
utils/deriveConstants/Main.hs