ghc-9.13: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Driver.GenerateCgIPEStub

Synopsis

Documentation

generateCgIPEStub Source #

Arguments

:: HscEnv 
-> Module 
-> InfoTableProvMap

If the CmmInfoTables map refer Cmm symbols which were deterministically renamed, the info table provenance map must also be accordingly renamed.

-> (NonCaffySet, ModuleLFInfos, Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats) 
-> CgStream CmmGroupSRTs CmmCgInfos 

lookupEstimatedTicks :: HscEnv -> Map CmmInfoTable (Maybe IpeSourceLocation) -> IPEStats -> CmmGroupSRTs -> IO (Map CmmInfoTable (Maybe IpeSourceLocation), IPEStats) Source #

Given: * an initial mapping from info tables to possible source locations, * initial IPEStats, * a CmmGroupSRTs,

map every info table listed in the CmmProcs of the group to their possible source locations and update IPEStats for skipped stack info tables (in case both -finfo-table-map and -fno-info-table-map-with-stack were given). See: Note [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)]

Note: While it would be cleaner if we could keep the recursion and accumulation internal to this function, this cannot be done without separately traversing stream of CmmGroupSRTs in Main. The initial implementation of this logic did such a thing, and code generation performance suffered considerably as a result (see #23103).