This is an archive of the discontinued LLVM Phabricator instance.

Move coverage related code into a separate library
ClosedPublic

Authored by eraman on Apr 20 2016, 10:42 AM.

Details

Summary

Recently, I ran into a circular dependency problem when I made Analysis depend on ProfileData. See http://lists.llvm.org/pipermail/llvm-dev/2016-April/098400.html for more context. ProfileData has an existing dependence on Analysis through Object and Bitcode. Only the Coverage code depends on Object. Splitting Coverage data into its own library removes the ProfileData->Analysis dependence. Does this seem reasonable?

Notes:

  • I have modeled this on Codegen which has some files underneath as well as subdirs that correspond to separate libraries.
  • Clang code that includes coverage headers need to be changed as well. Will send a patch once there is a general agreement on this patch.
  • I have used "svn mv" to move coverage related code into the new directory to preserver history.
  • I have not split the ProfileData unittest to a separate Coverage directory thinking there will be only one file there, but perhaps that also needs to be split?
  • check-all runs successfully, but it's quite likely that I have overlooked something.

Diff Detail

Event Timeline

eraman updated this revision to Diff 54301.Apr 20 2016, 10:42 AM
eraman retitled this revision from to Move coverage related code into a separate library.
eraman updated this object.
eraman added reviewers: bogner, vsk, davidxl.
eraman added a subscriber: llvm-commits.
vsk edited edge metadata.Apr 20 2016, 11:14 AM

Thanks for doing this. I don't see any 'gotchas' here. This lgtm so long as it passes check-{llvm,profile}.

Justin, does this look good?

Justin, independent of the fact that this is really not a blocker for the profile summary change (as you point out in another thread), this seems like a desirable change to separate coverage from the rest of the ProfileData. Does that make sense?

This revision was automatically updated to reflect the committed changes.
lib/ProfileData/CoverageMapping.cpp