LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 33500 - Investigate use of IR-based counter instrumentation for coverage
Summary: Investigate use of IR-based counter instrumentation for coverage
Status: NEW
Alias: None
Product: clang
Classification: Unclassified
Component: LLVM Codegen (show other bugs)
Version: trunk
Hardware: PC All
: P enhancement
Assignee: Vedant Kumar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-18 15:36 PDT by Vedant Kumar
Modified: 2017-06-19 20:58 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vedant Kumar 2017-06-18 15:36:55 PDT
Coverage makes use of frontend-based PGO instrumentation, which is much less efficient than the IR-based kind, primarily because it has no visibility into LLVM's inlining decisions. This results in instrumented basic blocks which contain multiple (redundant) counter increments. If we can find a way to map counters inserted by IR PGO to AST nodes, we could improve the situation.
Comment 1 Xinliang David Li 2017-06-19 20:58:41 PDT
It seems to be doable: FE needs to create and pass the mapping from regions to basic blocks  to LLVM in some way so that the IR PGO can use the information to update the counter expressions associated with source regions.