summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToCmm
diff options
context:
space:
mode:
authorSven Tennie <sven.tennie@gmail.com>2021-05-13 15:26:32 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-11 18:14:30 -0400
commitf5fdace5613914724eb00bcf7547c82f3ad12686 (patch)
treeeeaeb36a5b79192c19eed847a2663e13fbf8b1f8 /compiler/GHC/StgToCmm
parentc65a7ffa7d8962f769bfe1dfbad20e32e1709c20 (diff)
downloadhaskell-f5fdace5613914724eb00bcf7547c82f3ad12686.tar.gz
Optimize Info Table Provenance Entries (IPEs) Map creation and lookup
Using a hash map reduces the complexity of lookupIPE(), making it non linear. On registration each IPE list is added to a temporary IPE lists buffer, reducing registration time. The hash map is built lazily on first lookup. IPE event output to stderr is added with tests. For details, please see Note [The Info Table Provenance Entry (IPE) Map]. A performance test for IPE registration and lookup can be found here: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/5724#note_370806
Diffstat (limited to 'compiler/GHC/StgToCmm')
-rw-r--r--compiler/GHC/StgToCmm/Prof.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/StgToCmm/Prof.hs b/compiler/GHC/StgToCmm/Prof.hs
index 08a06f3242..58fdfeafd9 100644
--- a/compiler/GHC/StgToCmm/Prof.hs
+++ b/compiler/GHC/StgToCmm/Prof.hs
@@ -288,7 +288,7 @@ initInfoTableProv infos itmap this_mod
--pprTraceM "initInfoTable" (ppr (length ents))
-- Output the actual IPE data
mapM_ emitInfoTableProv ents
- -- Create the C stub which initialises the IPE_LIST
+ -- Create the C stub which initialises the IPE map
return (ipInitCode dflags this_mod ents)
--- Info Table Prov stuff