summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorAlp Mestanogullari <alpmestan@gmail.com>2019-07-24 21:46:49 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-08-02 22:20:14 -0400
commit0c5cd771a8792ca4a4a553d3d4636e32191ef936 (patch)
treecf6c57187c5b399c98bcdcffa8a69c8e36017d0f /compiler/codeGen
parent5e960287b74ce2e11be98dbf7c1dc4ce2d7e0d9a (diff)
downloadhaskell-0c5cd771a8792ca4a4a553d3d4636e32191ef936.tar.gz
compiler: emit finer grained codegen events to eventlog
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/StgCmm.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmm.hs b/compiler/codeGen/StgCmm.hs
index 6cdb14880a..83409b6b24 100644
--- a/compiler/codeGen/StgCmm.hs
+++ b/compiler/codeGen/StgCmm.hs
@@ -32,6 +32,7 @@ import CLabel
import StgSyn
import DynFlags
+import ErrUtils
import HscTypes
import CostCentre
@@ -70,7 +71,7 @@ codeGen dflags this_mod data_tycons
; cgref <- liftIO $ newIORef =<< initC
; let cg :: FCode () -> Stream IO CmmGroup ()
cg fcode = do
- cmm <- liftIO $ do
+ cmm <- liftIO . withTiming (return dflags) (text "STG -> Cmm") (`seq` ()) $ do
st <- readIORef cgref
let (a,st') = runC dflags this_mod st (getCmm fcode)