This is an archive of the discontinued LLVM Phabricator instance.

[PGO] runtime/instrumentation code restructuring
AbandonedPublic

Authored by davidxl on Nov 19 2015, 7:00 PM.

Details

Reviewers
silvas
vsk
Summary

This is the first step to enable code sharing (and being in sync) between LLVM and compiler-rt/lib/profile. In this patch, most of the data structures, key constant literals, enums, and signature affecting ABI and raw format are moved to the common file InstrProfData.inc which is to be shared (via copy) across runtime and LLVM. The file InstrProfData.inc is also restructured to allow it being included standalone. In particular

  1. Moved raw header field defs into the template file
  2. Moved VP kind enum to the file (affecting ProfData layout)
  3. Moved raw version, magic definitions to the file
  4. Moved runtime section name/namestring defs (with macros) in the file
  5. Added value profiling entry point API signature def
  6. change the comments into C style
  7. Added more documentation.

Diff Detail

Event Timeline

davidxl updated this revision to Diff 40727.Nov 19 2015, 7:00 PM
davidxl retitled this revision from to [PGO] runtime/instrumentation code restructuring.
davidxl updated this object.
davidxl added a reviewer: vsk.
davidxl added a subscriber: llvm-commits.
silvas requested changes to this revision.Nov 19 2015, 7:28 PM
silvas added a reviewer: silvas.
silvas added a subscriber: silvas.

Your 1-7 are natural separate patches, so please split this patch up.

This revision now requires changes to proceed.Nov 19 2015, 7:28 PM

Those changes are highly related and most of the changes are documentation
and in one file only. I think it is better to review the changes in one
piece (for better context).

Later I can of course commit the reviewed changes in smaller pieces
(logically just two of them).

thanks,

David

davidxl abandoned this revision.Nov 20 2015, 9:16 PM

Will break the patch into smaller pieces.