This is an archive of the discontinued LLVM Phabricator instance.

Instr PGO code small restructuring
ClosedPublic

Authored by davidxl on Oct 14 2015, 4:52 PM.

Details

Summary

In this clean up patch,

  1. key constant values (version, magic) and data structures related to raw and indexed profile format are moved into one centralized place: InstrProf.h.
  2. Utility function such as MD5Hash computation is also moved to the common header to allow sharing by other components in the future
  3. A header data structure is introduced for Indexed format so that the reader and writer can always be in sync
  4. Added some comments to document different places where multiple definition of the data structure must be kept in sync (reader/writer, runtime, lowering etc).

No functional change is intended.

Diff Detail

Event Timeline

davidxl updated this revision to Diff 37425.Oct 14 2015, 4:52 PM
davidxl retitled this revision from to Instr PGO code small restructuring.
davidxl updated this object.
davidxl added a reviewer: bogner.
davidxl added a subscriber: llvm-commits.

Any comments? There are more cleanup patches to follow.

This revision was automatically updated to reflect the committed changes.
include/llvm/ProfileData/InstrProfReader.h