ghc-9.6.4: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Driver.GenerateCgIPEStub

Synopsis

Documentation

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).